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
Write a trigger on Account Whenever New Account Record is created, then needs to create associated Contact Record Automatically with Account name as Contact LastName and Account Phone as Contact Phone in Salesforce
#22
Open
vijayk3327 opened this issue
Aug 27, 2023
· 0 comments
In this post we are going to learn about how to Write a trigger on Account Whenever New Account Record is created, then needs to create associated Contact Record Automatically with Account name as Contact LastName and Account Phone as Contact Phone in Salesforce.
What is the use of Apex triggers?
Apex triggers enable you to perform custom actions before or after events to records in Salesforce, such as insertions, updates, or deletions. Just like database systems support triggers, Apex provides trigger support for managing records. To know more details about Apex Triggers, Click Here →
In this post we are going to learn about how to Write a trigger on Account Whenever New Account Record is created, then needs to create associated Contact Record Automatically with Account name as Contact LastName and Account Phone as Contact Phone in Salesforce.
What is the use of Apex triggers?
Apex triggers enable you to perform custom actions before or after events to records in Salesforce, such as insertions, updates, or deletions. Just like database systems support triggers, Apex provides trigger support for managing records. To know more details about Apex Triggers, Click Here →
👉 To get source code live demo link, Click Here.
Create Apex Trigger →
Step 1:- Create Apex Trigger : accountContactTrigger.apxt
`TRIGGER accountContactTrigger ON Account (BEFORE INSERT, after INSERT) {
IF(TRIGGER.isBefore){
system.debug('I am inside before event');
}`
👉 To get source code live demo link, Click Here.
The text was updated successfully, but these errors were encountered: