You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this post we are going to learn about How to update the FirstName & LastName to the account on custom field contactSummary (Long Text Area) using trigger in Salesforce.
Account Custom Fields & Relationships
Create a custom field on Account name as contactSummary__c (Long Text Area).
Real time scenarios:- Write a trigger on contact and update the FirstName & LastName to the account on custom field contactSummary (Long Text Area) whenever contact record is only updated.
Trigger fired whenever contact record is only updated.
Standard object:- Account >> New custom field:- contactSummary__c (Long Text Area)
In this post we are going to learn about How to update the FirstName & LastName to the account on custom field contactSummary (Long Text Area) using trigger in Salesforce.
Account Custom Fields & Relationships
Create a custom field on Account name as contactSummary__c (Long Text Area).
Real time scenarios:- Write a trigger on contact and update the FirstName & LastName to the account on custom field contactSummary (Long Text Area) whenever contact record is only updated.
Trigger fired whenever contact record is only updated.
Standard object:- Account >> New custom field:- contactSummary__c (Long Text Area)
👉 To get source code live demo link, Click Here.
Step 1:- Apex Class Trigger : contactTriggerRollSummary.apxt
` TRIGGER contactTriggerRollSummary ON Contact (BEFORE INSERT, after INSERT, BEFORE UPDATE, after UPDATE) {
IF(TRIGGER.isBefore){
system.debug('trigger before event');
IF(TRIGGER.isUpdate){
contactList=TRIGGER.new;
}
}
}`
👉 To get source code live demo link, Click Here.
The text was updated successfully, but these errors were encountered: