2 answers
Hi AviKesari ,You have to reduce the number of SOQL queries fron the single thread because it is hitting the limit. You can do that by reducing it in may ways. Below is one example. For getting the record type, don't use query insted you can use below code: Old Query : RecordType taskRec = [SELECT Id FROM RecordType WHERE SobjectType ='Task' AND DeveloperName ='Safelite_Task_Record_Type'];No query required: Id devRecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByName().get('Development').getRecordTypeId();Here, 'Development' is the record type's name.https://developer.salesforce.com/forums/?id=906F0000000937iIAA