The Coding Approach When deeper customization is needed, the coding approach is a win-win situation. In this chapter, you will learn how Apex triggers can provide complex automation for your processes when a point & click approach is not enough. Also, we will see how to evaluate Visualforce and Lightning Components customizations (which you won’t…
Author: zeusexam
Managing a flow – Certified Advanced Salesforce Admin Exam Guide
Managing a flow Like any other automation process, a flow can be activated and deactivated. It supports versioning (and so cloning is a good choice if you wish to experiment with different versions) and, as in Process Builder, only one version of a flow can be active at a given time. A flow can be…
Order of execution – Certified Advanced Salesforce Admin Exam Guide
Order of execution We can basically do five different operations on Salesforce records:• Insert• Update• Upsert (which is just an insert or update operation, depending on the fact that the record may already be in the database, given a unique field such as its ID)• Delete• Undelete While the delete and undelete operations have never…
Trigger features and rules – Certified Advanced Salesforce Admin Exam Guide
Trigger features and rules In the previous section, we saw that the order of execution of Salesforce automation has to deal with all of the available automation tools within the Salesforce platform and that Apex triggers are called twice, before and after the record is saved to the database. This is one of the pros…
Apex trigger anatomy – Certified Advanced Salesforce Admin Exam Guide
Apex trigger anatomy So far, we know that a trigger is defined by the following: This is more or less the code involved in a trigger’s definition: 1. trigger OpportunityTrigger on Opportunity (before insert, before update,2. before delete, after insert, after update,3. after delete, after undelete) {4. //code goes here…5. } All possible event combinations…
Apex trigger anatomy 3 – Certified Advanced Salesforce Admin Exam Guide
The trigger logic worked as we expected! What if we try to delete the record? Unexpected error when deleting the opportunity How’s that? This is related to how the trigger is written. Let’s jump back to the Developer Console and the Logs panel: Debugging log after an unexpected record on a save operation Filtering a…
Apex trigger anatomy 2 – Certified Advanced Salesforce Admin Exam Guide
This property is a list of records of the opportunity type that contains all records that are part of the current trigger execution (and that have the most recent field values). A list is just a complex Apex type that is used to store a set of items of the same type. These elements can…
The after event – Certified Advanced Salesforce Admin Exam Guide
The after event Then, we can update the after update part on the trigger (some parts of the code have been hidden for simplicity; refer to this book’s GitHub repository for the full code): 1. trigger OpportunityTrigger on Opportunity (before insert, before 2. update, after insert, after update) { 3. 4. //current record (supposing only one opportunity can…
Schedule it right now! – Certified Advanced Salesforce Admin Exam Guide
Schedule it right now! In the previous section, I demonstrated that even after hours of study, you can make mistakes and get the wrong answer. This shouldn’t mean that you should procrastinate and forestall signing up to your exam forever: believe me, you can study as much as you can, but there will always be…
Failure is an option – Certified Advanced Salesforce Admin Exam Guide
Failure is an option First, don’t be afraid to fail. Failure is the perfect way to learn. Would you believe me when I say that I passed all these tests without a Result: FAILED message? Let’s take the Advanced Administrator certification as an example. It took me two attempts to clear the exam: in the…