Tuesday, 20 December 2011

How to create a Sales Order through X++ code in Ax 2009


Hi friends,
Today we are going to know about how to create a sales order through X++ code . The code s as follows
static void createSalesTable(Agrs args)
{
SalesTable salesTable;
NumberSeq NumberSeq;
;
NumberSeq =NumberSeq::newGetNumFromCode(SalesParameters::numRefSalesId().numberSequence);
salesTable.SalesId = NumberSeq.num();
salesTable.initValue();
//you can also pass your account number from query
salesTable.CustAccount = "1101";
salesTable.initFromCustTable();
salesTable.insert();
info("Sales Order has been Created Sucessfully");
}
I think this would help in creating sales order through code
Vivek Chirumamilla.

No comments:

Post a Comment