Tuesday, April 19, 2011

Create a Sales Order in AX 2009 using X++


Following is the Example of Creating a SalesOrder using X++ :

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");
}

2 comments:

  1. Good for X++ Developers. Nice Post.

    ReplyDelete
  2. However, in the end, the results are usually well worth the wait and effort. Having the opportunity to make $20,000 (in cash or equity) on one transaction is far from pie in the sky theory. Buyers are proving this to be true all across the country every single day. קורס מכירות

    ReplyDelete

Thanks for your time reviewing this blog.