I’m trying to calculate a few UD fields when Invoices are created.
I’ve got a function that takes Company and InvoiceNum as input params.
I trigger the function in each of these scenarios:
Standard Shipments (ARInvoice.GetShipmentsConsolidated, Method Directive)
Drop Shipments (ARInvoice.GetDropShipments, Method Directive)
RMAs (ARInvoice.GetRMACredits, Method Directive)
Miscellanious Invoices (Kinetic layer event)
But how could I do this for Counter Sales? A soon a I process the counter sale, the invoice gets posted (and locked).
I was getting away with running the function After SalesOrder.ProcessCounterSaleUsingOrderLinesInDatabase, but that was before implementing tax connect.
Now I’m getting an error “Tax Service records are committed. Update not allowed.”
Whats another trigger point I could use for this scenario? Where the Invoice has been created (including all lines), but not yet posted.
I’m trying a Data directivite now, but I’m still getting the same error, “Tax Service records are committed. Update not allowed.”
I’ve got an In-Transaction Data Directive on InvcHead.Update.
It uses this query condition to check for and only grab “Counter Sales”
It also checks for InvcHead.Posted has been changed to True. Maybe this condition is the problem? I was hoping I was getting the InvcHead BEFORE the Posted change was applied in the database.