Over come 200 record update limit on OnClick Javascript button click
Over Come 200 Record Update Limit on OnClick Javascript Button
Workaround : If really business want to update more than 200 records you can call apex class webservice method inside OnClick Javascript. Please use below sample code
Apex Class : global with sharing class apexClassname{ webService static String methodName(parm1, parm2,....) { return 'Result'; } }
OnClick Javascript:
var result = sforce.apex.execute("apexClassName","methodName",{Parm1:"{!Account.Id}"},Parm2:"{!Account.Name}"});
Note: Use this approach when your business case is less than 2500 records. you can increase record count based # of trigger will be executed in the background. if system have more business logic then you will get “apex cpu time limit exceeded ” exception.
0 Comments