29.12.2010, 02:16 | #1 |
Участник
|
dax-ideas: Creating a SalesOrder through .net applications or BC classes
Источник: http://dax-ideas.blogspot.com/2010/1...rough-net.html
============== Sometimes it would be necessary for us to create the SalesOrder through the .net application or some third party application at that time we need to make use of BC classes to create SalesOrder. Here is a small snipeet for creating the salesOrder through AXBC classes. X++: static void salesOrder(Args _args) { AxSalesTable axSalesTable; AxSalesLine axSalesLine; AxInventDim_SalesLine axInventDim; NumberSequenceReference numberSequenceReference; NumberSeq numSeq; SalesTable salesTable; SalesId salesId; ; ttsbegin; numberSequenceReference = SalesParameters::numRefSalesId(); numSeq = new NumberSeq(); numSeq = NumberSeq::newGetNum(numberSequenceReference,true); salesId = numSeq.num(); axSalestable = AxSalesTable::construct(); axSalesTable.parmCustAccount('100123'); axSalesTable.salesTable().initFromCustTable(); axSalesTable.salesTable().initValue(); axSalesTable.salesTable().initFromContactInfo(); info(salesId); axSalesTable.parmSalesId(salesId); if(!axSalesTable.salesTable().validateWrite()) { numSeq.abort(); break; } else { numSeq.used(); axSalesTable.save(); } SalesTable = SalesTable::find(salesId); axSalesLine = AxSalesLine::construct(); axSalesLine.parmSalesId(salesId); axSalesLine.salesLine().initValue(); axSalesLine.salesLine().initFromSalesTable(SalesTable); axSalesLine.parmItemId('1121'); axInventDim = AxInventDim_SalesLine::newAxSalesLine(axSalesLine); axInventDim.parmInventSizeId('42'); axInventDim.parmInventLocationId("21"); axInventDim.parmConfigId("HD"); axInventDim.parmInventColorId('01'); axInventDim.parmInventSiteId('2'); axInventDim.setInventDimId(); axSalesLine.axInventDim(axInventDim); axSalesLine.save(); ttscommit; } Источник: http://dax-ideas.blogspot.com/2010/1...rough-net.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
Теги |
axbc |
|
|