I have added custom validation to a doctype which contains few custom field as attachment. The doctype is part of a workflow. If someone tries to save the document with no validation it will throw and error saying attachment are mandatory.
The problem is validation are triggered when the doc status is not saved or user is trying to save it. Once the doc is submitted for approval the approver can remove those attachment and that the doc status still remains the same while any change in other fields like text/data or select changes the document status to “Not Saved”.
I am stuck with this issue from quite sometime any help on how I can achieve this will be appreciated.
Note: I am using Custom script for validations