You need to sign in to do that
Don't have an account?

Field update through Apex invoking validation rule
If opportunity stage value meets the criteria then trigger fires and invokes handler code which inturn calls external webservcie, if the response from webservcie is success then update a field in Account object.
The plan is to secure this field and there is a validation rule to prevent any user (except system admin and interface user) from updating on this field, ( the field can not be hidden from the PG layout and there are users with permission sets to update if the field is read only on PG layout)
I was under impression that the validation rules will by pass as the field update is happending in Apex, , but it is not.
-> User updates opportunity stage value,
-> the trigger fires and invokes webservcie,
-> webservice returns success
-> Apex tries to update field on Account , this step failed as there is a validation rule to prevent user from updating the field
Any thoughts on how to resolve this?
The plan is to secure this field and there is a validation rule to prevent any user (except system admin and interface user) from updating on this field, ( the field can not be hidden from the PG layout and there are users with permission sets to update if the field is read only on PG layout)
I was under impression that the validation rules will by pass as the field update is happending in Apex, , but it is not.
-> User updates opportunity stage value,
-> the trigger fires and invokes webservcie,
-> webservice returns success
-> Apex tries to update field on Account , this step failed as there is a validation rule to prevent user from updating the field
Any thoughts on how to resolve this?
All Answers