You need to sign in to do that
Don't have an account?
Muthu Samy
Custom case validation error using trigger
Can somebody help me on setting a custom validation using trigger on case object ?
Want to restrict users adding more than 500 children cases to parent case.
Want to restrict users adding more than 500 children cases to parent case.
-Praveen K Hari
Update will be little more complex. You have to do the validation only if the parent id is changed. You can use Trigger.oldMap to get the old values and compare with Trigge.new variable parent id. If you are finding a different in the parent id take the Trigger.new parent id and check its count as we are doing in above code.
You can use my code for the reference and build update event also.
-Praveen K Hari