getCurrentPartitionRecId Function
Applies To: Microsoft Dynamics AX 2012 R2
Retrieves the RecId field of the current partition.
int64 getCurrentPartitionRecId()
Return Value
The RecId field of the current data partition.
Remarks
To see a code example that relies on the getCurrentPartitionRecId function, see How to: Include a Filter for Partition in Direct Transact-SQL.
Example
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
****/
See also
Partitions, Companies, and Data Isolation in Microsoft Dynamics AX
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).