Welcome to my blog

I have been working with Salesforce for quite a while, so don’t hesitate to contact me if you have any questions or want some advice.

s f

Subscribe
Follow Us
h

Over come 200 record update limit on OnClick Javascript button click

 . Apex  . Over come 200 record update limit on OnClick Javascript button click

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.

Post a Comment