Removing attachment from a doctype does not change the doc status to "Not Saved"

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

Hi @binodmainali1

Based on my limited understanding of your problem, Instead of checking for document status “Not Saved”, you can check for workflow_state or user_roles or __islocal & tweak your conditions according to your needs.