Skip to main content

Posts

Showing posts with the label select

How to update funding Source for Project Contract in Ax 2012

If you want to  update funding Source for Project Contract in Ax 2012 by code then you can get idea from below code.  These all standard table. ProjFundingSource projFundingSource; ProjInvoiceTable projInvoiceTable; LogisticsLocation logisticsLocation,logisticsLocationNew; ; ttsBegin; while select projInvoiceTable order by ProjInvoiceProjId desc { if(projInvoiceTable.ProjInvoiceProjId != "S_002834") { if(projInvoiceTable.fundingSourceName() != "") { while select forUpdate projFundingSource where projFundingSource.ContractId == projInvoiceTable.ProjInvoiceProjId { projFundingSource.FundingSourceId = projInvoiceTable.fundingSourceName(); projFundingSource.InvoiceLocation = 0; projFundingSource.update(); } } } else break; } ttsCommit;

Sample code Example of Array in MSD Axapta

This is  Sample code  Example of Array in Axapta . str name; Array Arr = new Array (Types::String); int i= 1, j; Int test; TestTable TestTable; ; // Create an Str array // Write some elements in it while select TestTable { Arr.value(i, TestTable.TestTables);//(i, i*2); i++; } j = i; for (i = 1; i<j; i++) { test= Arr.value(i); while select TestTable where TestTable.TestTables == test { info(strfmt("%1", Arr.value(i))); } }