GetLockStatusICEntity

Indicates whether an entity is locked or unlocked for a given scenario, period, and year.

Note:

To test whether any entities are locked or unlocked for a scenario, year, and period, use GetICEntitiesLockStatus.

Syntax

<IHsvAdminICM>.GetLockStatusICEntity(lScenario, lYear, lPeriod, lEntity)

Argument

Description

lScenario

Long (ByVal). The member ID of the Scenario dimension member.

lYear

Long (ByVal). The member ID of the Year dimension member.

lPeriod

Long (ByVal). The member ID of the Period dimension member.

lEntity

Long (ByVal). The member ID of the Entity dimension member.

Return Value

Integer. Indicates whether the entity is locked. Valid values are represented by the HFMConstants type library constants listed in Lock Status Constants.

Example

The following function takes Scenario, Year, Period, and Entity dimension member IDs and returns a Boolean that indicates whether the entity is locked.

Function isEntityLocked(lScen As Long, lYear As Long, lPer As Long, _
    lEnt As Long) As Boolean
  Dim cAdminICM As IHsvAdminICM, iStatus As Integer
  'g_cSession is an HsvSession object reference
  Set cAdminICM = g_cSession.ICM
  iStatus = cAdminICM.GetLockStatusICEntity(lScen, lYear, lPer, lEnt)
  If iStatus = ICM_LOCKED Then
    isEntityLocked = True
  Else
    isEntityLocked = False
  End If
End Function