Compartilhar via


CompanyInfo::current Method

Gets the record ID of the legal entity that is associated with the specified data area ID.

Syntax

Note

The syntax of this method varies based on the version of Microsoft Dynamics AX that you are using.

  Microsoft Dynamics AX 2012 R3
          client server public static RecId current([SelectableDataArea _dataArea])

  Microsoft Dynamics AX 2012 R2 (SYS)
          client server public static RecId current([SelectableDataArea _dataArea])

  Microsoft Dynamics AX 2012 Feature Pack (SYS)
          client server public static RecId current([DataAreaId _dataArea])

  Microsoft Dynamics AX 2012 (FPK)
          client server public static RecId current([DataAreaId _dataArea])

  Microsoft Dynamics AX 2012 (SYS)
          client server public static RecId current([DataAreaId _dataArea])

Run On

Called

Parameters

Return Value

Type: RecId Extended Data Type
The record ID of the specified legal entity.

Remarks

This method is provided for callers that need the record ID of a legal entity but do not need any other fields. The cost of materializing the CompanyInfo table buffer from the cache is significant when it is called many times. This method avoids any table buffer initialization or data access layer operations, and instead does a lookup from the SysGlobalObjectCache class, which is significantly faster than the data access layer.

See Also

Reference

CompanyInfo Table