09.10.2012, 17:11 | #1 |
Участник
|
ax-erp: Creating sales orders with the SalesAutoCreate class
Источник: http://microsoft-dynamics-ax-erp.blo...ders-with.html
============== Many projects use an interface to import their sales orders, because of this a SalesAutoCreate class was created. This class is easily extendable and customizable.The first thing to do is designing a buffer table, like this one for example: After this we can start extending a new class from the SalesAutoCreate class and modifying the construct on the SalesAutoCreateClass . class TSTSalesAutoCreate extends SalesAutoCreate { TSTSalesImport TSTSalesImport; } static SalesAutoCreate construct(Common buffer = null, Object object = null, Common buffer2 = null) { switch (buffer.TableId) { case tablenum(SalesCreateReleaseOrderLineTmp) : return new SalesAutoCreate_ReleaseOrder(buffer,object,buffer2); case tablenum(PurchLine) : return new SalesAutoCreate_ProjPurchLine(buffer,object); case tablenum(SalesBasketLine) : return new SalesAutoCreate_Basket(buffer,object); //-> TST case tablenum(TSTSalesImport) : return new TSTSalesAutoCreate(buffer,object); // TST this.deleteProcessed(); //= #RetryNum) { throw Exception::UpdateConflictNotRecovered; } else { retry; } } else { throw Exception::UpdateConflict; } } } //SalesAutoCreate protected void deleteProcessed() { } //TSTSalesImport protected void deleteProcessed() {; super(); TSTSalesImport.selectForUpdate(true); TSTSalesImport.delete(); } Источник: http://microsoft-dynamics-ax-erp.blo...ders-with.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|