axaptadynamics-ax-2012x++number-sequence

How to forced my PackingSlipId by code in CustPackingSlipJour?


I'm creating SalesTable and SalesLine, and after I call this function,

SalesFormLetter_PackingSlip = SalesFormLetter::construct(DocumentStatus::PackingSlip);
SalesFormLetter_PackingSlip.parmId(MYTABLE.MYPackingSlipId);                 
SalesFormLetter_PackingSlip.update(SalesTable,M_MYTABLE.DocumentDate,SalesUpdate::All);

But when creating the CustPackingSlipJour it set the sales order status to Delivered, but the field CustPackingSlipJour.PackingSlipId is set by a NumberSequence.

I set Manual the Number Sequence, but nothing work.
Is it possible to Pick order and set the PackingSlipId with my value?


Solution

  • The packing slip id of the sales order is set by AX using a number sequence. You will need a customization, if you want change that.