function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RArunrajRArunraj 

Reg Script Statement calculation

what is script stament? can any body explain

 

for ex:

 

 

scriptTest();
public void scriptTest() {        
}
No of script statement is 2

 

scriptTest();

public void scriptTest() {      

 Integer i =0;

}

No of script statement is 2

 

how it is calculated? how we need to calculate the script statement commonly?

 

 

 

Shashikant SharmaShashikant Sharma

What you are checking I don't thing it is useful in calculating script limit but you can do it like this.

 

Limit Methods give you all the limits available in context and used 

 

system.debug(Limit.getScriptStatements() + '  Script tatement have been used out of + Limit.getLimitScriptStatements());

getScriptStatements : Returns the number of Apex statements that have executed in the current context.

 

getLimitScriptStatements : Returns the total number of Apex statements that can execute in the current context.


For more see : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_limits.htm