Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: Purchase Order Creation based on Purchase Requisition in ax 2012 R2 and R3

$
0
0

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.


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>