//Cancel product receipt journal in X++
static void CancelPOPackingSlip(Args _args)
{
PurchTable purchTable = PurchTable::find("CBS-000187");
VendPackingSlipJour vendPackingSlipJour;
PurchFormLetter purchFormLetter;
;
select * from vendPackingSlipJour where vendPackingSlipJour.PackingSlipId == "PS-187-1";
purchFormLetter = PurchFormLetter::construct(DocumentStatus::PackingSlip);
PurchFormLetter.parmVersioningUpdateType(VersioningUpdateType::Cancel);
PurchFormLetter.parmCallerTable(vendPackingSlipJour);
PurchFormLetter.allowEmptyTable(true);
PurchFormLetter.initAllowEmptyTable(true);
PurchFormLetter.multiForm(true);
purchFormLetter.update( purchTable,
vendPackingSlipJour.PackingSlipId,
VendPackingSlipJour.DeliveryDate,
PurchUpdate::ReceiveNow,
AccountOrder::None,
NoYes::No,
NoYes::No,
NoYes::Yes);
}
static void CancelPOPackingSlip(Args _args)
{
PurchTable purchTable = PurchTable::find("CBS-000187");
VendPackingSlipJour vendPackingSlipJour;
PurchFormLetter purchFormLetter;
;
select * from vendPackingSlipJour where vendPackingSlipJour.PackingSlipId == "PS-187-1";
purchFormLetter = PurchFormLetter::construct(DocumentStatus::PackingSlip);
PurchFormLetter.parmVersioningUpdateType(VersioningUpdateType::Cancel);
PurchFormLetter.parmCallerTable(vendPackingSlipJour);
PurchFormLetter.allowEmptyTable(true);
PurchFormLetter.initAllowEmptyTable(true);
PurchFormLetter.multiForm(true);
purchFormLetter.update( purchTable,
vendPackingSlipJour.PackingSlipId,
VendPackingSlipJour.DeliveryDate,
PurchUpdate::ReceiveNow,
AccountOrder::None,
NoYes::No,
NoYes::No,
NoYes::Yes);
}
No comments:
Post a Comment