New answers tagged

0

I hope this is not the only way, but if it is, then you should definitely write your test in this syntax. try { ApprovalTriggerHandler.bBypassTrigger = true; System.debug('Statement after insert.'); // Insert other records } catch (Exception e) { ApprovalTriggerHandler.bBypassTrigger = false; // Handle this exception here } Otherwise ...


0

You essentially would add queries to get the information. You have all the roles in old and new map. You can loop through them to add them into a list to use the following query to build a map that you can reference to get the name. Map<Id,UserRole> mapRoles = [SELECT Id FROM UserRole WHERE Id in :listOfRoles]; //later on p.OldRole__c = mapRoles.get(...


0

You can use an Async SOQL. Use Async SOQL when: You are querying against millions of records. You want to ensure that your query completes. You do not need to do aggregate queries or filtering outside of the index. Running Async SOQL Queries


Top 50 recent answers are included