Handling errors from doo.form.saveAndStay()

hello world,
please help - does anybody know, how to handle erros returned from doo.form.saveAndStay()? Unfortunatelly the script below does not catch errors like empty required field.

Thanks for ideas

Martin

function saveForm()
{
try {
doo.form.saveAndStay();
console.log(“OK”);
}

catch (error) {
console.error(“NOK”, error);
alert(“NOK alert”);
}

}
saveForm();

Hi,

Could I ask where you want to call this script in which section of Scripting? On model load? Is there any other related script that could affect this behavior?

Thank you for your reply.

Filip