Skip to main content

Posts

Showing posts with the label select

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");

How to get AOT element in current layer by code in axapta

To get AOT element in current layer by code in axapta you can  get help from below code. You can get other layer element by change enum value of utillevel. UtilElements _UtilElements; while select _UtilElements where _UtilElements.recordType == UtilElementType::ExtendedType && _UtilElements.utilLevel == global::currentAOLayer() { info(strfmt("%1",_UtilElements.name)) ; }