Skip to main content

Posts

Showing posts from December, 2016

Remove spaces from Text in Ax 2012

To Remove spaces from Text you can get idea from below code sample. Here we are update name fields which include spaces on right and left side . Dirpartytable Dirpartytable; Name Name; ; while select forUpdate Dirpartytable { ttsBegin; Name= strRTrim(strLTrim(Dirpartytable.Name)); Dirpartytable.Name = Name; Dirpartytable.doUpdate(); ttsCommit; } info("Done");

Cascade delete option in Ax 2012

Cascade delete option in Ax 2012 . You can apply as below image for your tables.

Update and Update_RecordSet Code sample in Ax 2012

This is Update and Update_RecordSet Code sample. Result of both will be same . TestTable TestTable; //Update_Recordset update_recordset TestTable setting Name ="New Enterprises" where TestTable.Accountnum =="uS-027"; //Update ttsBegin; while select forupdate TestTable where TestTable.Accountnum =="uS-027" { TestTable.Name ="New Enterprises"; TestTable.update(); } ttsCommit; info("OK");