Starts a submission phase, given the member IDs of a cell in the phase.
To start by passing a phase ID, use PhasedSubmissionStart2.
<HsvProcessFlow>.PhasedSubmissionStart lScenario, lYear, lPeriod, lEntity, lParent, lValue, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, vbUseAllValueMembers, bstrAnnotation, psNewProcessState
Argument | Description |
---|---|
lScenario | Long (ByVal). The member ID of the process unit's Scenario dimension member. |
lYear | Long (ByVal). The member ID of the process unit's Year dimension member. |
lPeriod | Long (ByVal). The member ID of the process unit's Period dimension member. |
lEntity | Long (ByVal). The member ID of the process unit's child Entity dimension member. |
lParent | Long (ByVal). The member ID of the process unit's parent Entity dimension member. |
lValue | Long (ByVal). The member ID of the process unit's Value dimension member. |
lAccount | Long (ByVal). The member ID of the cell’s Account dimension member. |
lICP | Long (ByVal). The member ID of the cell’s Intercompany Partner dimension member. |
lCustom1 | Long (ByVal). The member ID of the cell’s Custom1 dimension member. |
lCustom2 | Long (ByVal). The member ID of the cell’s Custom2 dimension member. |
lCustom3 | Long (ByVal). The member ID of the cell’s Custom3 dimension member. |
lCustom4 | Long (ByVal). The member ID of the cell’s Custom4 dimension member. |
vbUseAllValueMembers | Boolean (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. |
bstrAnnotation | String (ByVal). The comment for the process management action. |
psNewProcessState | Integer. Returns the CEnumProcessFlowStates enumeration constant that represents the review level resulting from the action. See Table 136, CEnumProcessFlowStates Enumeration. |
The following function starts a given cell's submission phase if the following conditions are met:
HsvScenarios.SupportsProcessFlow indicates that the scenario is enabled for process management.
IHsvDataSecurity.GetProcessUnitAccessRightsAndStateEx indicates that the connected user has All access rights and that the submission phase’s review level is Not Started.
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