PhasedSubmissionStart

Starts a submission phase, given the member IDs of a cell in the phase.

To start by passing a phase ID, use PhasedSubmissionStart2.

Syntax

<HsvProcessFlow>.PhasedSubmissionStart lScenario, lYear, lPeriod, lEntity, lParent, lValue, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, vbUseAllValueMembers, bstrAnnotation, psNewProcessState
ArgumentDescription
lScenarioLong (ByVal). The member ID of the process unit's Scenario dimension member.
lYearLong (ByVal). The member ID of the process unit's Year dimension member.
lPeriodLong (ByVal). The member ID of the process unit's Period dimension member.
lEntityLong (ByVal). The member ID of the process unit's child Entity dimension member.
lParentLong (ByVal). The member ID of the process unit's parent Entity dimension member.
lValueLong (ByVal). The member ID of the process unit's Value dimension member.
lAccountLong (ByVal). The member ID of the cell’s Account dimension member.
lICPLong (ByVal). The member ID of the cell’s Intercompany Partner dimension member.
lCustom1Long (ByVal). The member ID of the cell’s Custom1 dimension member.
lCustom2Long (ByVal). The member ID of the cell’s Custom2 dimension member.
lCustom3Long (ByVal). The member ID of the cell’s Custom3 dimension member.
lCustom4Long (ByVal). The member ID of the cell’s Custom4 dimension member.
vbUseAllValueMembersBoolean (ByVal). Specifies whether to apply the action to submission phases for Value dimension members related to the lValue member. Pass TRUE to apply the action to related submission phases.
bstrAnnotationString (ByVal). The comment for the process management action.
psNewProcessStateInteger. Returns the CEnumProcessFlowStates enumeration constant that represents the review level resulting from the action. See Table 136, CEnumProcessFlowStates Enumeration.

Example

The following function starts a given cell's submission phase if the following conditions are met:

The function returns an array that includes the SupportsProcessFlow value, the user's access rights, and the submission phase's review level.

Function StartPhase(lScen As Long, lYear As Long, lPer As Long, lEnt As _









    Long, lPar As Long, lVal As Long, lAcct As Long, lIcp As Long, _
    lC1 As Long, lC2 As Long, lC3 As Long, lC4 As Long, sNote As String) _
    As Variant
Dim cProcessFlow As HsvProcessFlow, lRights As Long, iState As Integer
Dim iNewState As Integer, bEnabled As Boolean, cDataSec As IHsvDataSecurity
Dim cScenario As HsvScenarios, vaRet(2) As Variant
'g_cSession represents an HsvSession instance
Set cDataSec = g_cSession.Security
Set cProcessFlow = g_cSession.ProcessFlow
'g_cMetadata represents an HsvMetadata instance
Set cScenario = g_cMetadata.Scenarios
cScenario.SupportsProcessFlow lScen, bEnabled
vaRet(0) = bEnabled
If bEnabled = True Then
    cDataSec.GetProcessUnitAccessRightsAndStateEx lScen, lYear, lPer, _
    lEnt, lPar, lVal, lAcct, lIcp, lC1, lC2, lC3, lC4, MEMBERNOTUSED, _
    lRights, iState
    vaRet(1) = lRights
    If lRights = HFM_ACCESS_RIGHTS_ALL Then
        If iState = PROCESS_FLOW_STATE_NOT_STARTED Then
            cProcessFlow.PhasedSubmissionStart lScen, lYear, lPer, lEnt, _
            lPar, lVal, lAcct, lIcp, lC1, lC2, lC3, lC4, False, sNote, _
            iNewState
            vaRet(2) = iNewState
        Else
            vaRet(2) = iState
        End If
    End If
End If
StartPhase = vaRet
End Function