Expand Minimize
0 out of 1 rated this helpful - Rate this topic

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
****/

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.