Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Log Account name changes into a custom object.
trigger AccountChangeLog on Account (after update) {
List<Account_Log__c> logs = new List<Account_Log__c>();
for(Account acc : Trigger.new) {
Account oldAcc = Trigger.oldMap.get(acc.Id);
if(acc.Name != oldAcc.Name) {
logs.add(new Account_Log__c(Account__c=acc.Id, Old_Name__c=oldAcc.Name, New_Name__c=acc.Name));
}
}
insert logs;
}Salesforce Scripting refers to the use of programming and declarative scripting tools within Salesforce to automate processes, customize behavior, and extend the platform using Apex, Visualforce, Lightning Web Components, and Flow.
Origin & Creator
Developed by Salesforce.com, introduced in the mid-2000s to enable custom business logic on the cloud-based CRM platform.
Industrial Note
Extensively used in CRM automation, enterprise SaaS customization, and custom application development on Salesforce clouds.