function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Usha Charles 3Usha Charles 3 

Auto update trigger on Account object

Hello,

I have the below code to update the country field if the state field is filled. I was able to save the trigger but I'm getting the following error while I try to save a record with the state field. I have System Administrator profile & ave Read/Write Access on Account object..

Please let me know where I have gone wrong, I'm an administrator trying to learn Apex.

 Apex trigger SU caused an unexpected exception, contact your administrator: SU: execution of AfterInsert caused by: System.FinalException: Record is read-only: Trigger.SU: line 4, column 1

User-added image

Thanks,
Usha