Hi Friends,
The below can be used to post the product receipt for a purchase order. It is same as we used to do in previous version but it is good to keep it handy.
The main thing is to pass the parameters in update method. The below job will post the product receipt for the inventory quantities which have been Registered. Please note the purchase order should be confirmed before posting the product receipt.
To reuse it quickly, here it is:
static void Job12(Args _args)
{
PurchTable purchTable = PurchTable::find("000032");
PurchFormLetter purchFormLetter;
purchFormLetter = purchFormLetter::construct(DocumentStatus::PackingSlip);
purchFormLetter.update( purchTable,
"PA009",
systemDateGet(),
PurchUpdate::RegisteredAndServices,
AccountOrder::None,
false,
false);
info("Done");
}
The below can be used to post the product receipt for a purchase order. It is same as we used to do in previous version but it is good to keep it handy.
The main thing is to pass the parameters in update method. The below job will post the product receipt for the inventory quantities which have been Registered. Please note the purchase order should be confirmed before posting the product receipt.
To reuse it quickly, here it is:
static void Job12(Args _args)
{
PurchTable purchTable = PurchTable::find("000032");
PurchFormLetter purchFormLetter;
purchFormLetter = purchFormLetter::construct(DocumentStatus::PackingSlip);
purchFormLetter.update( purchTable,
"PA009",
systemDateGet(),
PurchUpdate::RegisteredAndServices,
AccountOrder::None,
false,
false);
info("Done");
}
Hy Priyanka,
ReplyDeleteI got this error when run the code:
"Cannot create a record in Purchase order - update table (PurchParmTable). Purchase order: xxxxxxxxxxx. The record already exists.
The purchase order mentioned in the info error message isn't the order I try to receipt.
Run this code in ax 2012 R2 CU6
Any idea ?
Bye.
Dante.
I Solve, deleting some records in error in the table "PurchParmTable".
ReplyDeleteInteresting post. I Have Been wondering about this issue, so thanks for posting. Pretty cool post.It 's really very nice and Useful post.Thanks
ReplyDeleteSEO
nice, thanks
ReplyDelete