Showing posts with label lookup. Show all posts
Showing posts with label lookup. Show all posts

Wednesday, July 27, 2011

strRem Function - Delete a Character from String - AX 2009

The following code searches a specified string character and deletes it. The cool thing about this function is that it is case sensitive.


str strRem(str text1, str text2)
text1  The string from which to remove characters.
text2 The characters to exclude from the output string.

For example:

strRem("MynameIs","is"); //Returns the string "MynameI".

Tuesday, June 7, 2011

Macros in AX 2009 - AX 2009

Macros are constants, or pieces of code, that are being taken care of by the compiler before the rest of the code to replace the code where the macro is used with the content of the macro.

There are three different types of macros: stand alone macros, local macros, and macro libraries.

Macros are typically constant values that are only changed by developers. They are used so that developers don't have to hardcode these kind of values in the X++ code, but rather refer to the macro.

Tuesday, March 8, 2011

Languages in AX 2009 - Using a the LanguageTable form for Lookup building- AX 2009

Today I had a requirement to only show the following language across the whole application:
  • en-us
  • fr
  • it
At first I thought to create a custom lookup method as I did for another requirement last month (http://axwonders.blogspot.com/2011/03/filter-activity-form-contact-to-only.html), but then I thought .. Oh my .. this would mean to add a lookup method to several forms across the application, and what about if I need to change something in the future? It was a fact that the scalability of this change will be an issue.

Because the requirement said "Across the application" I decided to modify the LanguageTable form to be shown as a lookup in every instance of the LanguageID across the application.

The following are the steps I took: