You need to sign in to do that
Don't have an account?
Vipul Sharma 15
Adderror() is called in SF1 app and should prevent a record from getting approved, but it processes the record
Hello ,
Here is the scenario,
I have an apex trigger and its handler class with an adderror method, so whenever a record is in approval process and some user tries to approve/reject a record without entering any commnets , addError method is called and it shows the mesaage that comments cannot be blank but after refreshing the page, the record status is changed from Pending to Approved.
This is working well and good in sfdc web but coming to SF1 I am facing this issue , record is getting approved/Rejected even after adderror throws an error(it should not happen) inn SF1.
Please advice how to overcome it. Or if more information is needed do let me know. Thanks for the assistance.
Here is the scenario,
I have an apex trigger and its handler class with an adderror method, so whenever a record is in approval process and some user tries to approve/reject a record without entering any commnets , addError method is called and it shows the mesaage that comments cannot be blank but after refreshing the page, the record status is changed from Pending to Approved.
This is working well and good in sfdc web but coming to SF1 I am facing this issue , record is getting approved/Rejected even after adderror throws an error(it should not happen) inn SF1.
Please advice how to overcome it. Or if more information is needed do let me know. Thanks for the assistance.