getCurrentPartition Function
Collapse the table of content
Expand the table of content

getCurrentPartition Function [AX 2012]

Updated: April 13, 2012

Applies To: Microsoft Dynamics AX 2012 R2

Retrieves the short name of the current partition.

str getCurrentPartition()

The short name of the current partition.

The maximum length of the returned data partition name is 8 characters.

The following code example shows calls to, and outputs from, the getCurrentPartition function of the X++ language, and related functions or methods.

static public void Main(Args _args)  // X++ method.
    int64              iPartition;
    str                sPartition;
    SelectableDataArea oSelectableDataArea;  // System ExDT.

    iPartition = getCurrentPartitionRecId();
    sPartition = getcurrentpartition();

    oSelectableDataArea = Global::getCompany( tableNum(BankAccountTable) );
    Global::info( strFmt(
        "getCurrentPartitionRecId =%1 , getCurrentPartition =%2 , getCompany =%3", 
        iPartition, sPartition, oSelectableDataArea) );

/**** Pasted from Infolog window:
Message_@SYS14327 (03:42:38 pm)
getCurrentPartitionRecId =5637144576 , getCurrentPartition =initial , getCompany =ceu

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

Community Additions

© 2016 Microsoft