I’m trying to run some code whenever the status of a sales order gets to “delivered”, but I’m having trouble telling when that happens.
I had code in the ModifiedField method, but it doesn’t run because SalesTableType/SalesFormLetter calls SalesTable.doUpdate, which seems to cause this method to be skipped.
I want to monitor when it’s invoiced as well. Also when purchase orders are “received” and “invoiced”…
This is what I was thinking. The reason I wanted it table level is I might be automatically packing slip/invoicing salesorders and purchaseorders, and it looks like I’m going to have to have code in the SalesFormLetter_packingSlip, SalesFormLetter_Invoice, PurchFormLetter_packingSlip, PurchFormLetter_Invoice. It would have been nice to just have it in one spot somehow.
I’m trying to duplicate intercompany functionality between two dynamics AX systems and the AIF won’t really work for us unless I change the functionality of it.
try debugging from CreateJournal method call of Run method of SalesFormLetter/PurchFormLetter. I think inside insertjournal method you may find the place where the status gets updated.