ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Abort Workflow If Condition Not Met


I want to make a field go through workflow (from Pending to Approved) if and only if field A is not null. Is this achievable through field level or need to go through custom script. In both cases, kind-of help will be hugely appreciable. Thank You

This is what I found in my workflow and tried something like

Still No Success. ANy help please


@nikzz I guess your condition is worng.

Could you try :

doc.fumsg1 != undefined


@nikzz, you code should be Python not js, telling that, the appropriated syntax should be



Not worked…giving error

NameError: name 'bool' is not defined


Throwed error

  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 1489, in safe_eval
    return eval(code, eval_globals, eval_locals)
  File "<string>", line 1, in <module>






Its quite working but what happened here is. It hides the action button until fumsg field is null. What exactly I want is there should be action button and if fumsg field is empty, give an alert and abort workflow