CPU Time Out Salesforce.com introduced a new governor limit called CPU Timeout in winter 14, what exactly is CPU Time out and how its get calculated and whats get counted for CPU Timeout. As per Salesforce.com documentation CPU Timeout is calculated for all executions on the Salesforce application servers occurring in one apex transaction - for executing apex code and all the process called from code such as workflows, validation rules, package code. CPU Timeout is private for transaction and is isolated from other transactions. CPU Timeout for Synchronous apex: 10,000 milliseconds CPU Timeout for Asynchronous apex: 60,000 milliseconds CPU Timeout Counted for: 1. Workflows 2. Validation Rule 3. Library functions exposed in apex code CPU Timeout do not count for: 1. SOSL 2. SOQL 3. DML 4. Http callouts CPU Timeout can be explained as Time taken by the apex transaction in a context including Apex code, Validation rules, Workflows ...
Posts
Showing posts from March, 2015
- Get link
- X
- Other Apps
By
Puneet Mishra
-
Select Option Sorting List is an ordered collection of elements which can be of any data type - primitive types, collections, sObjects, that are distinguished by their indices. First element indices in List is always 0. we can sort the list using sort() method. For primitive data type sorting is always done in ascending order. example : List<String> names = new List<String>{ 'Pawan','Vishal','Vivek','Rishabh','Dinda', 'pawan'}; system.debug(' List before Sorting : ' + names); names.sort(); system.debug(' List after Sorting : ' + names); sorted list will be (Dinda, Pawan, Rishabh, Vishal, Vivek, pawan) SelectOption is also sorts in ascending order using value and label fields in sequence 1. The value of fields is used for sorting. 2. If value of fields have the same value or both are empty then label is used. NOTE : empty fields precede non-empty fields example: Lis...
- Get link
- X
- Other Apps
By
Puneet Mishra
-
Load Test Data from Static Resource we write test class to test out functionality and in test class we create test data, but in Salesforce using Test.loadData method, you can populate data in our test method without writing any code. To load test data from Static Resource we have to create a .csv file and upload it to Static Resource copy and paste the below data and save the file in .csv extension. Name,Website,Phone,BillingStreet,BillingCity,BillingState,BillingPostalCode,BillingCountry sForceTest1,http://www.sforcetest1.com,(415) 901-7000,The Landmark @ One Market,San Francisco,CA,94105,US sForceTest2,http://www.sforcetest2.com,(415) 901-7000,The Landmark @ One Market Suite 300,San Francisco,CA,94105,US sForceTest3,http://www.sforcetest3.com,(415) 901-7000,1 Market St,San Francisco,CA,94105,US go to Static Resource [ Setup -> Develop -> Static Resource ] create new Static Resource record, give Static Resource Name as "Test Records" and sav...