I am using AX 2012.I have below requirement.
For one PO no I have maylines.
PurchTable
#PO12312 Test Purchase Vendorooo1
Purchline
Item1 Testitem1
Item2 TestItem2
Item3 TestItem3
Item4 TestItem4
Item5 TestItem5
PO is in received status.Now I want to invoice only Item3.How we will achieve this using x++.
//This code will invoice all items for the same PO
PurchTable purch = PurchTable::find('TestPO');
poinv = PurchFormLetter::construct(DocumentStatus::Invoice);
poinv.update(purch,strFmt("Test01%1", purch.PurchId));
//This code will invoice all items for the same PO