How to give error message

Hello,

I have written one client script where i am fetching some values. So if fetched value is empty / null then i wanted to show error message how i can show?? Then that document should not save/submit.

Set the if condition according your logic and set the message/throw like

frappe.msgprint("document should not save/submit")

// OR

frappe.throw("document should not save/submit")
1 Like