Saturday 4 July 2020

Episode 2-Ten Most Important Topics you need to prepare for Salesforce PD1 Certification

If this is your first attempt at Salesforce Platform Developer(I)  Certification and want the one-stop platform where you can have one last revision of a few Important Topics. Yes, You are at the Correct place.
Please read the blog to know insights into some important concepts which need to be revised before appearing for your certification exam. Before Wasting Time let's get started.💪 Also, read till the end to know the BONUS Tip.


MVC Architecture in Salesforce     
                                                   
Model: It represents data or database objects.

View: It represents the Visualization of data.

Controller: It represents the implementation of your logic.




Cross Object Formula Field

Cross object formula field derives its value from the related parent object and displays it on its child object.

NOTE: You can create a cross-object formula field that reference data from its parent object up to 10 Relationship away.

Data Import Wizard versus Data Loader



Apex  Governor Limits

Every Apex code is bounded by the governor's limits to make sure that no one is monopolizing the resources in a multi-tenant environment.

Please check out all the governor limit values in Salesforce.

NOTE: Exceeding the Governor limits will result in an exception that cannot be caught or handled using the Exception handling mechanism.     

 Parent to Child Relationship using SOQL

SOQL queries that reference Account to Contact relationship(standard objects) and also  between Class__c to Students__c relationship(custom objects) are:

SELECT Id,Name,(SELECT Id,LastName from Contacts) from Account
SELECT Id,Name ,(SELECT Id,Name from Students__r) from Class__c

NOTE: Only 1 Level of the nested query is allowed(  you can remember as 1 LEVEL DOWN)

Child to Parent Relationship using SOQL

Examples of SOQL Queries between two standard objects and between two custom objects are:

SELECT Id,AccountId,Account.Name FROM Contact (Account is parent of Contact object)

SELECT Id,Class__c,Class__r.Name FROM Student__c (Class__c is the parent of Student__c object)

NOTE: You can Access up to 5 levels of parents using DOT Notation( i.e 5 LEVEL UP)

Order Of Execution in Salesforce

On the server, Salesforce:
  1. Loads the original record from the database or initializes the record for an upsert statement.
  2. Loads the new record field values from the request and overwrites the old values.
    If the request came from a standard UI edit page, Salesforce runs system validation to check the record for:
    • Compliance with layout-specific rules
    • Required values at the layout level and field-definition level
    • Valid field formats
    • Maximum field length
    When the request comes from other sources, such as an Apex application or a SOAP API call, Salesforce validates only the foreign keys. Before executing a trigger, Salesforce verifies that any custom foreign keys do not refer to the object itself.

    Salesforce runs user-defined validation rules if multiline items were created, such as quote line items and opportunity line items.

  3. Executes record-triggered flows that are configured to run before the record is saved.
  4. Executes all before triggers.
  5. Runs most system validation steps again, such as verifying that all required fields have a non-null value, and runs any user-defined validation rules. The only system validation that Salesforce doesn't run a second time (when the request comes from a standard UI edit page) is the enforcement of layout-specific rules.
  6. Executes duplicate rules. If the duplicate rule identifies the record as a duplicate and uses the block action, the record is not saved and no further steps, such as after triggers and workflow rules, are taken.
  7. Saves the record to the database, but doesn't commit yet.
  8. Executes all after triggers.
  9. Executes assignment rules.
  10. Executes auto-response rules.
  11. Executes workflow rules.
  12. If there are workflow field updates, updates the record again.
  13. If the record was updated with workflow field updates, fires before update triggers and after update trigger one more time (and only one more time), in addition to standard validations. Custom validation rules, flows, duplicate rules, processes, and escalation rules are not run again.
    Note

    The refiring of triggers isn't limited to updates but applies to all operation types. A workflow field update that fires on record insert will rerun any before and after insert triggers again—as insert triggers.

  14. Executes the following Lightning Flow automation, but not in a guaranteed order.
    • Processes
    • Flows launched by processes
    • Flows launched by workflow rules (flow trigger workflow actions pilot)

    When a process or flow executes a DML operation, the affected record goes through the save procedure.

  15. Executes escalation rules.
  16. Executes entitlement rules.
  17. Executes record-triggered flows that are configured to run after the record is saved.
  18. If the record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the parent record. Parent record goes through save procedure.
  19. If the parent record is updated, and a grandparent record contains a roll-up summary field or is part of a cross-object workflow, performs calculations and updates the roll-up summary field in the grandparent record. Grandparent record goes through the save procedure.
  20. Executes Criteria Based Sharing evaluation.
  21. Commits all DML operations to the database.
  22. Executes post-commit logic, such as sending an email.

Platform Event

It is based on the Publisher-Subscriber Model
Various Apps can publish and subscribe to Platform Event using Apex and using CometD in the external system.
To publish the notification Events you have to call the EventBus.publish Method in Apex

Standard List Controller

Using Standard List Controller we can create Visual force Pages that display a set of records.

Example:

<apex:page standardController="Contact" recordSetVar="contacts">
    <apex:pageBlock>
        <apex:pageBlockTable value="{!contacts}" var="con">
            <apex:column value="{!con.lastname}"/>      
        </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>

NOTE:Including recordSetVar attribute in your code includes Standard List Controller for Contact instead of Standard  Contact Controller. 

                                                                                                          

Lightning Component Framework

It is the UI framework used for developing responsive and dynamic web pages  for mobile and desktop devices that can run on the Salesforce  Platform.

Programming Language used in this Framework:
      
Server Side 

  • Apex Programming Language

Client-Side
  • HTML
  • CSS
  • JavaScript

BONUS TIP: There is no Short Cut to Success.If  your Concepts  are clear,You will definitely clear the certification Exam.Prepare,Practice and appear for your Exam.

Thanks for Reading my Blog. Do Like and Comment If you find it useful. You can also  Comment for what topic you want me to write my next Blog.Keep Learning and Sharing Your Knowledge.😊





                                                                                                                                                                                                                                                                                                          

                                                                                                               

3 comments:

If you have any doubts ,Please let me know.

Episode 13 : RollUp Summary Trigger for Lookup Relationship

 As we all know we can use roll-up summary field logic only for the master-detail relationship, but in case you have the business requiremen...