-
Trigger
trigger trigger_1 on Contact (before insert) {
List<Contact>contacts= trigger.new;
for(Contact c:contacts){
c.name='naresh';
}
}As i am trying to to execute this code but it is not executing show Field is not writeable :contact.Name
- This discussion was modified 4 years, 7 months ago by Naresh kumar.
- This discussion was modified 4 years, 7 months ago by Naresh kumar.
Log In to reply.
Popular Salesforce Blogs
Top 4 Salesforce Spring ’21 Features for CPQ
Hello Salesforce lovers! Salesforce is releasing its most awaited Spring ’21 release. Today, we will shed light on some of the major changes and features added to Salesforce CPQ in this…
Lightning Web Component | Salesforce Developer Guide
Lightning Web Component Presently you'll construct Lightning components utilizing two programming models: Lightning Web Components and the first demonstrate, Air Components. Lightning web components are…
Salesforce Apex Trigger - Child to Parent Trigger using Map
Hello guys, In this blog, I am sharing the code of trigger it will update the account field on updation or insertion of Contact field.…
Popular Salesforce Videos
What is Audit Trail in Salesforce? Explain in Detail
Audit Trail helps to track the recent setup changes and is especially useful in organizations with multiple administrators. Learn all about it here.
After Triggers | Trigger in Salesforce - Part 2
In this video, we are going to look into - After Trigger with Example, Our Scenario is - For After Insert Whenever my account record…
Unleash the Power of Compare Tables | Salesforce Video
In this video, you will learn how to use compare tables to calculate complex calculations quickly, which you can then use to visualize your data.…