Trigger on contact to update a account custom field.

Hey guys, today 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)
Standard object:- Contact >> Standard fields:- FirstName, LastName
Files we used in this post example:-
contactTriggerRollSummary.apxt
Apex Class Trigger
It will be fired whenever contact record is updated
Parent Object:- Account
Custom Field :- contactSummary__c
Parent Object with Custom Field
Trigger on contact and update the FirstName and Lastname to the account on custom field contactSummary (Long Text Area).
Child Object:- Contact
Standard Field:- FirstName, LastName
Child Object with Field
Contact FirstName and LastName will be updated to account whenever record is edit and save.
You can download file directly from github by click here Final Output

Other post that would you like to learn
Step 1:- Apex Class Trigger : contactTriggerRollSummary.apxt
From Developer Console >> File >> New >> Apex Trigger
contactTriggerRollSummary.apxt [Apex Class Trigger]
Other related post that would you like to learn
Originally published at https://www.w3web.net on August 7, 2020.