Skip to main content

Posts

How to separate Fraction and Digit from Number in axapta

To separate Fraction and Digit from Number in axapta like number is 878778.3000 and you want to get 878778 and .300 then below code can help you to get the same. qty t=878778.3000; str _amount = strFmt("%1",num2str(t,0,1,0,0)); boolean decimals; TextBuffer txtAmount = new TextBuffer(); txtAmount.setText(_amount); if (txtAmount.find("^[0-9]+$")) // Regular expression inside the find method { decimals = true; } info(strFmt("%1 -- %2",trunc(t),frac(t)));

How to modify funding Source for particular Project contract In Ax 2012

How to modify funding Source for particular Project contract in Project Module. Below is the code sample to get Idea for the same. ProjFundingSource projFundingSource; ProjInvoiceTable projInvoiceTable; LogisticsLocation logisticsLocation,logisticsLocationNew; ; ttsBegin; while select projInvoiceTable where (projInvoiceTable.ProjInvoiceProjId != "PROJ_002834") { while select forUpdate projFundingSource where projFundingSource.ContractId == projInvoiceTable.ProjInvoiceProjId { projFundingSource.FundingSourceId = projInvoiceTable.fundingSourceName(); projFundingSource.InvoiceLocation = 0; projFundingSource.update(); } } ttsCommit;

What are the Reserved words in Axapta

Following are the Reserved words list in Ax 2012 1 abstract 54 implements 2 anytype 55 index 3 as 56 insert_recordset 4 asc 57 int 5 at 58 int64 6 avg 59 interface 7 break 60 is 8 breakpoint 61 join 9 by 62 like 10 byRef 63 maxOf 11 case 64 minOf 12 catch 65 mod 13 changeCompany 66 new 14 class 67 next 15 client 68 noFetch 16 container 69 notExists 17 continue 70 null 18 count 71 optimisticLock 19 crossCompany 72 order 20 date 73 outer 21 default 74 pause 22 delegate 75 pessimisticLock ...