getPrefix Function [AX 2012]

Updated: December 10, 2009

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

Retrieves the current execution prefix after successive calls to the setPrefix function.


str getPrefix()

The current execution prefix.

The prefix mechanism makes it more straightforward to write precise error messages about the transactions performed by an application. Because it creates a hierarchical display in the Infolog, it can be easier to determine from where each error came.

static void getPrefixExample(Args _arg)
{
    ;
    setPrefix("Prefix");
    setPrefix("Another prefix");
    print getPrefix();
    pause;
}

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

Community Additions

ADD
Show: