Skip to main content

Posts

How to remove special characters from string in MSD axapta

To remove special characters from string in axapta you can try following code . static void formatedString(Args _args) { str StringVal = “ Hello \tSumit \n Dear”; str replace(str _sourceStr, str _what, str _with) { int found = 0; str target = _sourceStr; ; do { found = strscan(TargetStr, _what, found, strlen(TargetStr)); if (found != 0) { TargetStr = strdel(TargetStr, found, strlen(_what)); TargetStr = strins(TargetStr, _with, found); found += strlen(_with); } } while (found != 0); return TargetStr; } ; StringVal = replace(StringVal, ‘\n’, ”); StringVal = replace(StringVal, ‘\r’, ”); StringVal = replace(StringVal, ‘\t’, ”); StringVal = replace(StringVal, ‘ ‘, ”); info(StringVal); }

Add sort field on grid using form datasource in MSD axapta

To Add sort field on grid using form data source in axapta  you can do following code in form data source table on execute query method. public void executeQuery() {; InventTable_ds.query().dataSourceNo(1).sortClear(); InventTable_ds.query().dataSourceNo(1).addSortField(fieldNum(CustTable,CustGroup), sortOrder::Ascending); super(); } After adding code you can call in modified method of control or init method of form. public boolean modified() { boolean ret; ; ret = super(); InventTable_ds.executeQuery(); return ret; }

ttsBegin and ttsCommit in MSD axapta

You can use ttsbegin and ttscommit with ttsabort following way. You can try in job public boolean myMethod() { try { ttsBegin; select forUpdate myTable; myTable.fname = testt_; myTable.update(); ttsCommit; } catch(exception::Error) { ttsabort; return(false); } return(true); }

Error on deploying the ssrs reports for reporting services in MSD axapta

If you are getting following Error on deploying  the ssrs reports for reporting services in axapta . could not load file or assembly 'microsoft.dynamics.kernel.cli ent. You can try following step to resolve this error. 1. copy the AXReports.exe file place to the folder: c:\Program files\Microsoft Dynamics AX\50\Client\Bin, and registering the Microsoft.Dynamics.Kernel.Client file in the GAC by dragging and dropping the file to the folder: c:\windows\assembly. 2. Checke for user permission issues. 3. Check whether  Reporting service SIte Link Working or not.

Sale order table structure in MSD axapta

If you want to know sales order table flow then you need to know following flow. for customer following table user Custparameter CustTable, CustGroup. Sales Order front screen table SalesTable->SalesParmtable SalesLine->Sale order table structure in axapta After posting data goes to CustInvoiceJour CustInvoiceTrans CustTrans Financial voucher effect goes to LedgerTrans. InventTrans Table is common table for all inventory.