Skip to main content

Posts

Showing posts with the label create

Release products to the legal entities using X++

static void releaseProducts_Job(Args _args) { EcoResProduct ecoResProduct; InventTable inventTable; InventTableModule inventTableModule; NumberSequenceTable numberSequenceTable; ItemId itemId; InventItemSetupSupplyType inventItemSetupSupplyType; EcoResStorageDimensionGroupProduct ecoResStorageDimensionGroupProduct; EcoResTrackingDimensionGroupProduct ecoResTrackingDimensionGroupProduct; EcoResStorageDimensionGroupItem ecoResStorageDimensionGroupItem; EcoResTrackingDimensionGroupItem ecoResTrackingDimensionGroupItem; ; select firstOnly ecoResProduct where EcoResProduct.DisplayProductNumber == "test"; //Audio system changecompany ('CEU') { ttsBegin; inventTable = null; inventTableModule = null; inventItemSetupSupplyType = null; ecoResStorageDimensionGroupProduct = null; ecoResTrackingDimensionGroupProduct = null; ecoResStorageDimensionGroupItem = null; ecoResTrackingDimensionGroupItem = null; numberSequenceTable = InventParameters::num...

Create loop from an AX form DataSet - Ax 2009

Sometimes we need to loop through values at the form level. The following code loops (for loop) the SalesParmTable in the CloseOk() Form method.                 //Create Lines         for (localSalesParmTable = salesParmTable_ds.getFirst();               localSalesParmTable;               localSalesParmTable = salesParmTable_ds.getNext())         {               ....Implementation....         }

Create Movement Journal And Post from excel

static void MovementJournalImportExcel(Args _args) {      InventJournalTrans         inventJournalTrans;      InventDim                  inventDim;      InventJournalTable         inventJournalTable;      InventJournalCheckPost     journalCheckPost;      InventJournalId            journalId;      journalTableData           journalTabledata;      InventBatch                inventBatch;      InventBatch          ...

Create LookUps Using X++

Lookups using X++ Code(without Ax Table or EDT relation). For that i override a String(Text) Control’ s lookup method. public void lookup() { //super(); // Added by Vasanth Arivali // Declaration Query LookupQuery = new Query(); QueryBuildDataSource LookupQueryBuildDataSource; QueryBuildRange LookupQueryBuildRange; SysTableLookup CustomSysTableLookup = SysTableLookup::newParameters(tableNum(InventTable), this); ; // Add fields that you want in Lookups CustomSysTableLookup.addLookupField(fieldNum(InventTable, ItemId)); CustomSysTableLookup.addLookupField(fieldNum(InventTable,ItemName)); CustomSysTableLookup.addLookupField(fieldNum(InventTable,ItemGroupId)); CustomSysTableLookup.addLookupField(fieldNum(InventTable,ItemType)); // Add DataSource, Range and Value LookupQueryBuildDataSource = LookupQuery.addDataSource(tableNum(InventTable)); LookupQueryBuildRange= LookupQueryBuildDataSource.addRange(fieldNum(InventTable,ItemVisibility)); LookupQueryBuildRan...

Invent Movement Journal Creation and Posting from excel

static void MovementJournalImportExcel(Args _args) { InventJournalTrans inventJournalTrans; InventDim inventDim; InventJournalTable inventJournalTable; InventJournalCheckPost journalCheckPost; InventJournalId journalId; journalTableData journalTabledata; InventBatch inventBatch; InventBatch localInventBatch; NumberSeq numberSeq; NumberSequenceReference numberSequenceReference; InventSerial inventSerial; InventSerial localinventSerial; int j,countno=0,i,k; real Scarp; FilenameOpen filename; Sysexcelapplication excelapp=sysexcelapplication::construct(); sysexcelworksheet excelworksheet; sysexcelrange excelrange; sysexcelcells excelcells; // comvariant cellvalue=new comvariant(); ; // Creating Journal Header inventJournaltable.initValue(); inventJournalTable.JournalNameId = 'ERecover'; numberSeq = new NumberSeq(); n...

how to create new account to vendtable

void ismailCreateVend() {     VendTable                   vendTable;     EmplTable                   emplTable;     NumberSeq                   numberSeq;     str                         accnum;     ;     ttsbegin;     numberSeq = NumberSeq::newGetNumFromCode(VendParameters::numRefVendAccount().NumberSequence);     vendTable.AccountNum   = numberseq.num();     accnum               ...