varStr Function [AX 2012]

Updated: August 18, 2010

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Retrieves a string that contains the name of the specified variable.


str varStr(str var)

Parameter

Description

var

The name of the variable

A string that contains the name of the specified variable.

This function is a compile-time function, which is a metadata assertion function. Compile-time functions take arguments that represent entities in the Application Object Tree (AOT) and validate these arguments at compile time. They have no effect at run time.

static void varStrExample(Args _arg)
{
    str myString;
    anytype myVariable;
    ;
    
    myString = varStr(myVariable);
    Global::info(strfmt("%1 is the variable name.", myString));
}
/****Infolog Display.
Message (02:26:56 pm)
myVariable is the variable name.
****/

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: