cancel/stop record save based on condition
Collapse
X
-
Could you please post the code you wrote? I need to do something similar, but I'm not very good at JS. -
I was able to solve this. wrote a custom method for actionSave to complete my validation then called Dep.prototype.actionSave.call(this).Leave a comment:
-
cancel/stop record save based on condition
Hi,
Can anyone please help me as to how I can stop the record from being saved either from front end js or php. I am looking for a functionality similar to 'Record not modified'.
Description:
My code for api is triggered in 'before:save' condition of record and returns a ID back to CRM. I am checking if the ID is valid and cancel save if it is not valid.
I have tried triggering the 'cancel:save' event, tried this.ischanged = false, throw an error from js(this stops the execution but not the desired result as mentioned earlier), throw an exception from php.
Thanks in advance for any help on this.
Tags: None

Leave a comment: