You need to sign in to do that
Don't have an account?
bouscal
Before or After? New or Old?
Need some help understanding when to use before or after triggers and new or old. Spefically I have the following issue;
When a Case is Escalated I want to create a child Case of a different record type but only if one doesn't already exist. this works.
* If the child Case already exists I want to update it's status (from Closed to Open). * System.FinalException: Record is read-only:
When the child Case is closed I want to update the Parent. this works
Also, when the Child is Closed I want to update the Parent. this works.
I have the code to do all of that but I get read only errors trying to update the Child. I have tried with many combinations of before/after new/old
When a Case is Escalated I want to create a child Case of a different record type but only if one doesn't already exist. this works.
* If the child Case already exists I want to update it's status (from Closed to Open). * System.FinalException: Record is read-only:
When the child Case is closed I want to update the Parent. this works
Also, when the Child is Closed I want to update the Parent. this works.
I have the code to do all of that but I get read only errors trying to update the Child. I have tried with many combinations of before/after new/old
All Answers