Wednesday 9 January 2013

Microsoft Dynamics AX 2012 R2 - attributeStr Function


Validates that the specified attribute class exists in the AOT; if not, a compiler error occurs.


Function

  • str classStr(class class)

Parameters

  • Parameter: class
  • Description: The name of the attribute to validate.


Return Value

  • The name of the attribute.
This function is an intrinsic function, which is a metadata assertion function. Intrinsic 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.

Attributes are classes that inherit from the SysAttribute class.


Example

  • X++
static void attributeStrExample(Args _args)
{
    str s;
    ;
    s = attributeStr(AifDocumentOperationAttribute);
    print s;
    pause;
}

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics AX 2012 R2 - attributeStr Function' was informative. Please feel free to leave your comments.

No comments:

Post a Comment