formControlStr Function [AX 2012]
Updated: June 24, 2009
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
This function causes the X++ compiler to check whether the control exists on the form, and to replace the function call with a string of the valid control name.
str formControlStr(formName, controlName)
A compile error is issued if the compiler determines that the control does not exist on the form. If your X++ code uses a string with quotation marks to supply the control name, the error cannot be discovered until run time. Use of this function enables the compiler to discover the error earlier at compile time.
X++ functions such as formControlStr that are executed by the compiler are called intrinsic functions or compile-time functions. That is why the input parameters are not standard strings in quotation marks. Compile-time functions are not represented in the p-code or other executable that is output by the compiler.
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).