in Education by
I would really appreciate if someone can guide me to check if a particular field is included in update call inside a before/after update trigger. Many thanks. Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
All the fields are present in the trigger so, to ascertain if a specific field had been modified you have to retrieve a previous version of the row using oldMap which is Map and compare the values in old and new. For example: trigger CaseOnParticularFieldUpdate on Case (before update) { for (Case c: Trigger.new) { Case oldCase = Trigger.oldMap.get(c.ID); if (c.Field != oldCase.Field) { // field was updated, do some magic here } } } To learn in-depth about Workflow in Salesforce, sign up for an industry based Salesforce Course.

Related questions

0 votes
    Is there a way to determine if a trigger is being executed by an API call or through the Salesforce Web Interface ... updating to 26.0) Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    Is there any way to check if a list contains a certain element? I looked at the List functions and did not see any ... ; } break; } } Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I have recently discovered that salesforce.com is much more than an online CRM after coming across a Morrison's Case ... ' .Net route? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I'm trying to update a record via the SalesForce API (Enterprise WSDL). The code below executes fine, and the ... updateParticipant }); if (result == null || result.Length...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    How do I check if a field is Blank in Salesforce using SOQL. Thanks Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I have a web service class that will be in a managed package and distributed to multiple clients. The class ... accomplish this? Thanks Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I have a page with a form that posts to salesforce.com's webto Lead service. I am trying to make an ... receiving website can see? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I have a page with a form that posts to salesforce.com's webto Lead service. I am trying to make an ... receiving website can see? Select the correct answer from above options...
asked Feb 5, 2022 in Education by JackTerrance
0 votes
    I'm trying to get an authorization token using the Username-Password flow (as described in the final section of this ... work for me. Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    We're looking into setting up a proper deployment process. From what I've read there seems to be 4 ... PickList items? SControls Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me how to land a job with Salesforce Admin Certification? Select the correct answer from above options...
asked Jan 19, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me how many hours to learn Salesforce? Select the correct answer from above options...
asked Jan 10, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me how to pass the Salesforce app builder exam? Select the correct answer from above options...
asked Jan 10, 2022 in Education by JackTerrance
0 votes
    Can anyone tell me how do I prepare Salesforce App Builder certification? Select the correct answer from above options...
asked Jan 10, 2022 in Education by JackTerrance
0 votes
    Could someone tell me how to get a job in Salesforce? Select the correct answer from above options...
asked Jan 6, 2022 in Education by JackTerrance
...