D365FO -AX – Remove spaces from Text in X++

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
   Name= strRTrim(strLTrim(Dirpartytable.Name));
   Dirpartytable.Name = Name;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s