getCurrentPartitionRecId Function [AX 2012]

Updated: April 17, 2012

Applies To: Microsoft Dynamics AX 2012 R2

Retrieves the RecId field of the current partition.

int64 getCurrentPartitionRecId()

The RecId field of the current data partition.

To see a code example that relies on the getCurrentPartitionRecId function, see How to: Include a Filter for Partition in Direct Transact-SQL.

The following code example shows calls to, and outputs from, the getCurrentPartitionRecId 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

ADD
Show: