You need to sign in to do that
Don't have an account?
Mig
execution of AfterInsert caused by: System.Exception: Record is read-only:
Error when I save a record The trigger is triggered but with an error : "execution of AfterInsert caused by: System.Exception: Record is read-only: "
I'm trying to make an update after insert. And I'm ADMIN and the record is not read-only. Did anybody had an error like this one ?
I'm trying to make an update after insert. And I'm ADMIN and the record is not read-only. Did anybody had an error like this one ?
We cannot update record using Trigger.new context variable in after insert trigger.
To update record in after insert trigger, you have to use SOQL and DML Statement.
Hope this would help.
Regards,
V. R.
Have a nice day. Cheers
Mig
I have a similar situation and have tried using a SOQL query and DML update function but am still getting the error message. Please see code below and give me any suggestions.