![](https://www.infallibletechie.com/wp-content/uploads/2023/07/Record-is-read-only-error-in-Salesforce-Apex-Trigger-1024x576.jpg)
Exception:
System.FinalException: Record is read-only
Field update cannot be done after the record has been Inserted/Updated/Saved. So, use after insert or after update as the trigger events.
Sample Trigger to reproduce the issue:
trigger AccountTrigger on Account ( after insert ) {
for ( Account objAcc : trigger.new ) {
objAcc.Description = 'Testing';
}
}
![](https://www.infallibletechie.com/wp-content/uploads/2023/07/Salesforce-Record-is-Read-Only-Exception.jpg)
“System.FinalException: Record is read-only” Salesforce Exception is thrown since the Account trigger is updating the Description field value of the Account record in “after insert” event.