getCurrentPartition Function
Applies To: Microsoft Dynamics AX 2012 R2
Retrieves the short name of the current partition.
str getCurrentPartition()
Return Value
The short name of the current partition.
Remarks
The maximum length of the returned data partition name is 8 characters.
Example
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
****/
See also
getCurrentPartitionRecId Function
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).