How to get new Sales order number,Project proposal id and Transfer order number in Ax 2012


To get new Sales order number,Project proposal id and Transfer order number in Ax 2012 You can get hints from below code.


 //Get new sales Id   
 salesTable.SalesId = NumberSeq::newGetNum(SalesParameters::numRefSalesId()).num();  
 //Get new project proposal id  
 NumSeq = NumberSeq::newGetNum(NumberSeqReference::findReference(extendedTypeNum(ProjProposalId)));  
 //Get new Transfer order number  
 inventTransferTable.TransferId = InventTransferTable::numberSeq().num();  

Where parameter table is used and extended data type passed in method.