Skip to main content

Posts

Showing posts with the label posted

X++ code for Project Item Requirement posting in Ax 2012

Below is the X++ code for Project Item Requirement posting in Ax 2012. SalesFormLetter salesFormLetter; salesTable Salestablelocal; str 200 msg; if(this.parmSalesid()) { changeCompany(_legalentity) { select Salestablelocal where Salestablelocal.Salesid ==this.parmSalesid() && Salestablelocal.salestype==SalesType::ItemReq && Salestablelocal.SalesStatus==SalesStatus::Backorder; if(Salestablelocal) { ttsBegin; salesFormLetter = SalesFormLetter::construct(DocumentStatus::Confirmation); salesFormLetter.update(Salestablelocal); salesFormLetter = SalesFormLetter::construct(DocumentStatus::ProjectPackingSlip); salesFormLetter.update(Salestablelocal); ttsCommit; msg = "Item Requirement with Sales order id : " + this.parmSalesid() + " Posted "; } else