Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unlock/Locking using VB Script

724777Oct 1 2009 — edited Nov 8 2009
I am trying lock/unlock entities using VB script using the SetCalcStatusLocked API for HFM. The code is below. The routine appears to run but the entity status does not change to locked. Am I missing a step somewhere?

Thanks you


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' SubProgram: Lock
' Parameters: lScenario
' lYear
' lPeriod
' lEntity
' lParent
' lValue
' Purpose: Lock the process unit for the given Parameters
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Lock(lScenario, lYear, lPeriod, lEntity, lParent, lValue)
On Error Resume Next

Dim oLock

If g_oSession Is Nothing Then
Log "Application needs to be opened before performing this operation!"
Err.Clear
Exit Sub
End If

Set oLock = WScript.CreateObject("Hyperion.HFMwData")
If Err Then
Log "Unable to create HFMwData. Please ensure this component is installed and registered!"
Log Err.Description
Err.Clear
Exit Sub
End If
oLock.SetWebSession(g_oSession)
oLock.SetCalcStatusLocked lScenario, lYear, lPeriod, lEntity, lParent, lValue
If Err Then
Log Err.Description & "xx" & g_oSession & "_" & lScenario & "_" & lYear & "_" & lPeriod & "_" & lEntity & "_" & lParent & "_" & lValue
Err.Clear
Exit Sub
End If

Exit Sub
End Sub
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 6 2009
Added on Oct 1 2009
4 comments
1,869 views