Sunday, 10 April 2016

#Salesforce Certified Platform Developer II : Sharing Experience

Hi All,
After long time of 5 months I went for another certification and this one is a new one, didn't get allot of information about the experience of the this new salesforce certification, now I have 8 salesforce certs, I must say this one is made me nervous, but felt great when I cleared this one.



Here are few important things that should be looked into before appearing in the exam

Compound Field Considerations and Limitations

Address and geolocation compound fields are convenient and result in more concise, clear code. Here are some things to consider when using them in your apps.
Both address and geolocation compound fields have the following limitations.
  • Compound fields are read-only. To update field values, modify the individual field components.
  • Compound fields are accessible only through the SOAP and REST APIs. The compound versions of fields aren’t accessible anywhere in the Salesforce user interface.
  • Although compound fields can be queried with the Location and Address Apex classes, they’re editable only as components of the actual field. Read and set geolocation field components by appending “__latitude__s” or “__longitude__s” to the field name, instead of the usual “__c.”
Use convertCurrency() in a SOQL query to convert currency fields to the user’s currency. This action requires that the organization is multicurrency-enabled.
Use this syntax for the RETURNING clause:
convertCurrency(Amount)
For example,
FIND {test} RETURNING Opportunity(Name, convertCurrency(Amount))

If an org has enabled advanced currency management, dated exchange rates are used when converting currency fields on opportunities, opportunity line items, and opportunity history. With advanced currency management, convertCurrencyuses the conversion rate that corresponds to a given field (for example, CloseDate on opportunities). When advanced currency management isn’t enabled, the most recent conversion date entered is used.

Continuation :Make Long-Running Callouts from a Visualforce Page

Use asynchronous callouts to make long-running requests from a Visualforce page to an external Web service and process responses in callback methods. Asynchronous callouts that are made from a Visualforce page don’t count toward theApex limit of 10 synchronous requests that last longer than five seconds. As a result, you can make more long-running callouts and you can integrate your Visualforce pages with complex back-end assets.

An asynchronous callout is a callout that is made from a Visualforce page for which the response is returned through a callback method. An asynchronous callout is also referred to as a continuation.


Transaction Control

All requests are delimited by the trigger, class method, Web Service, Visualforce page or anonymous block that executes the Apex code. If the entire request completes successfully, all changes are committed to the database. For example, suppose a Visualforce page called an Apex controller, which in turn called an additional Apex class. Only when all theApex code has finished running and the Visualforce page has finished running, are the changes committed to the database. If the request does not complete successfully, all database changes are rolled back.
Sometimes during the processing of records, your business rules require that partial work (already executed DML statements) be “rolled back” so that the processing can continue in another direction. Apex gives you the ability to generate a savepoint, that is, a point in the request that specifies the state of the database at that time. Any DML statement that occurs after the savepoint can be discarded, and the database can be restored to the same condition it was in at the time you generated the savepoint.

DML Statements vs. Database Class Methods

Apex offers two ways to perform DML operations: using DML statements or Database class methods. This provides flexibility in how you perform data operations. DML statements are more straightforward to use and result in exceptions that you can handle in your code. 


Set Up Test Data for a Test Class

Test setup methods are defined in a test class, take no arguments, and return no value. The following is the syntax of a test setup method.
@testSetup static void methodName() {
}
Use test setup methods (methods that are annotated with @testSetup) to create test records once and then access them in any test method in the test class. Test setup methods are useful and can be time-saving when you need to create a common set of records that all test methods operate on or prerequisite data.

Best Practices for Improving Visualforce Performance

Defining Transient with variable and minimizing the view state, using lazy loading and  the minification of JavaScript and CSS,

InvocableMethod Annotation

Use the InvocableMethod annotation to identify methods that can be run as invocable actions.
Invocable methods are called with the REST API and used to invoke a single Apex method. Invocable methods have dynamic input and output values and support describe calls.
The following code sample shows an invocable method with primitive data types.

 public class AccountQueryAction {  
  @InvocableMethod(label='Get Account Names' description='Returns the list of account names corresponding to the specified account IDs.')  
  public static List<String> getAccountNames(List<ID> ids) {  
   List<String> accountNames = new List<String>();  
   List<Account> accounts = [SELECT Name FROM Account WHERE Id in :ids];  
   for (Account account : accounts) {  
    accountNames.add(account.Name);  
   }  
   return accountNames;  
  }  
 }  



Pagination Strategies 

When to use standardsetcontroller, or when to offset and SOQL, best that you can have about this topic is this post

Few more topics

1. Lightning components
2. Using Developer console.
3. Test class best practice
4. SOQL and SOSL
5. Apex charts
6. Rollup summary
7. Http callout and its testing

If you cover all these topics, then for sure you can clear this exam.
thanks


14 comments:

  1. Hi Abhi,

    Nice blog post! Could you please share some tips for passing Salesforce Developer1 exam? Or have got any dumps for that? Thanks

    ReplyDelete
    Replies
    1. Hi Abhi,

      I am preparing for PD2 transition which I have to give before 6th. Could you please help me more topics and material.Could you please guide me more?

      Thanks

      Delete
  2. Do you have sample questions? Or dumps?

    ReplyDelete
  3. The information on this blog is very useful and very interesting. If someone needs to know about the just click Salesforce Developer Training | Salesforce Developer Certification

    ReplyDelete
  4. if any one needs PD2 MCQ Exact dumps kindly contact salesforcedumpspd2@gmail.com

    ReplyDelete
  5. I have latest PD2 MCQ dumps if you would like to buy please email to salesforcedumpspd2@gmail.com for rs 6k

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. For latest dumps reach out to me on rakesh.sdna@gmail.com

    ReplyDelete
  8. DIAC is offering Salesforce.com Training with on admin, developer, salesforce lightening, crm. Call @ +919310096831 for details on course fees, syllabus, placement facilities, batch timings, course duration.

    ReplyDelete
  9. I just cleared the PD2 and Service Cloud exam. Please mail me at salesforcecertguide2018[at]gmail.com for latest exact questions and guidance or any help required for the examinations.

    ReplyDelete
  10. For Latest winter 19 Salesforce Certification questions with answers,Please write to me on suri.sdna@gmail.com

    ReplyDelete
  11. Hi all, Anyone needs updated salesforce certification Self study guides - Sample questions with correct answers contact us at abhishekpowar76@gmail.com
    More Details visit: Salesforce Certification sample questions

    ReplyDelete