Showing posts with label Governor Limit. Show all posts
Showing posts with label Governor Limit. Show all posts

Friday, September 21, 2012

Removing the last character from a String - Salesforce

Its easy to remove the last character from a string by using the Substring() method..
If X is a string  the last value can be removed by

                             String Y = X.Substring(0,X.length()-1);

Friday, August 31, 2012

Too Many SOQL Queries: 101 in Salesforce

While writing a trigger or a class one may encounter the error "Too Many SOQL Queries : 101" which occurs when the governor limit for SOQL Queries crosses its threshold...........

one of the common errors would be including the SOQL Query inside a for loop..

so avoid this error 

Avoid writing  the SOQL query inside a For loop......