New answers tagged


You are missing a colon in the SOQL query. It should be Profile p = [SELECT Id FROM Profile WHERE Name=:PROFILE_NAME limit 1]; The colon is mandatory as it will let Salesforce know that you are trying to bind an Apex code variable in the SOQL query. For more details, please refer the official Salesforce documentation on this link https://developer.salesforce....


It is a bind variable, so it needs to be used with colon. Also it should be declared outside the test method. Moreover, when you use @IsTest annotation on the method, you do not need to add testMethod modifier (which is deprecated). Finally, SeeAllData is false by default for test class, so it is not necessary to add this annotation to the class: @IsTest ...


Sid's suggestion of deactivating the failing Flow/Process Builder is a valid one. However, our organization has multiple processes running on one record. I was able to solve this and have my bulk update process without any errors by changing the Batch number to '1' instead of the default '200' - Solution located here.


There is a Flow/Process Builder in your org, with the API name "System Pick - Update System_Pick_at_First_System_Rec" What you need to do is deactivate this - attempt your data load and then reactivate it. It seems to be running for more than one records in your batch and invoking multiple recursions that are attributing to this limit.

Top 50 recent answers are included