Posts

Showing posts from August, 2014

HOW TO PASS THE SALESFORCE DEVELOPER DEV-401 EXAM...!

I agree that Salesforce Developer DEV-401 exam is easier than Salesforce Administrator ADM-201. I recommend taking the Salesforce Administrator ADM-201 first, although this is no longer a pre-requisite to the Salesforce Developer DEV-401 it gives Salesforce professionals a good grounding. Resources To Pass Salesforce Developer Exam (DEV-401): Salesforce Developer Study Guide  (PDF) Force.com Platform Fundamentals  ( Free) Premier training -  Building Applications with Force.com and Visualforce (DEV401) Tip Sheets and Implementation Guides  (Salesforce Help - Free) Workshop: Get Started on the Certified Force.com Developer Credential  (Dreamforce video) Specific Areas To Focus On : Master-detail relationships Sharing rules and Org Wide Defaults Assignment rules Approval processes Junction Objects Workflows Custom report types Analytic snapshots Validation rules Field level security Record types Role hierarchy Relationship rules Master-Detail Rel

Using Stateful Batch Apex

Batch Apex is stateless by default. That means for each execution of your  execute  method, you receive a fresh copy of your object. All fields of the class are initialized, static and instance. If your batch process needs information that is shared across transactions, one approach is to make the Batch Apex class itself stateful by implementing the  Stateful  interface. This instructs Force.com to preserve the values of your static and instance variables between transactions. Ex: global class MyBatch implements Database.Batchable<sObject>, Database.statefull { private static Integer queryCount = 0; global MyBatch(){ } global Database.QueryLocator start(Database.BatchableContext BC){ return Database.getQueryLocator( 'Your Query' ); } global void execute(Database.BatchableContext BC, List<Sobject> scope ){ / /should be the last line queryCount = queryCount ++ } global void finish