Hi Nitesh,
my client has the same need as MJ so trying to do some custo. Precisely, I tried to create an event subscription from the autoApproveChangeRequest method of PurchTable table:
public static void setDocStateAsDraft(XppPrePostArgs _args)
{
PurchTable purchTable;
purchTable = _args.getThis();
purchTable.DocumentState = VersioningDocumentState::Draft;
}
The DocumentState field is really set (I can see it when I debug) but at the moment when I open my PO from the infolog generated after creation, my approval state change instantly from Draft to Approved (By debugging, the value just after the super() call in the PurchTable_DS.executeQuery ).
Please do you have some guidance to achieve this?
Thanks in advance for you response.