Skip to main content

Posts

Showing posts with the label salesformletter

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 ...

Post Sales Order from business connector with CSharp in MSD axapta

This code can help you AxaptaRecord AXSalesTable = ax.CreateAxaptaRecord("SalesTable"); AXSalesTable = ax.CallStaticRecordMethod("SalesTable", "find", SalesId) as AxaptaRecord; AxaptaObject axSalesFormLetter_Invoice = ax.CreateAxaptaObject("SalesFormLetter_Invoice"); axSalesFormLetter_Invoice.Call("new"); axSalesFormLetter_Invoice.Call("update", AXSalesTable);