Article Details
| Id: | 10906 |
| Product: | finPOWER Connect |
| Type: | NEW |
| Version: | 1.06.07 |
| Opened: | 07/02/2013 |
| Closed: | 12/02/2013 |
| Released: | 27/03/2013 |
| Job: | J011080 |
Workflows; new Workflow Type Script event 'UpdateDocumentsList' allows Documents published from Workflow Actions wizard to be modified
A new Workflow Type Script event, 'UpdateDocumentsList' has been added. This allows the list of Document presented in the Workflow Actions wizard to be modified.
By default, the list of Document includes Account Type Documents available to the Account Type for ALL of the selected Workflows.
Using this event allows Documents to be added or removed from the list. The sample below shows how a Document can be added to the list, even if it is not listed as 'Available' on the Account Type.
' Handle EventsSelect Case eventIdCase "UpdateDocumentsList"' Update the list of Documents presented in the Workflow Actions wizardDim Document As finDocumentRODim Documents As List(Of finDocumentRO)Dim Include As BooleanDim TaskManagerWorkflow As finTaskManagerWorkflowDim TaskManagerWorkflows As List(Of finTaskManagerWorkflow)Documents = DirectCast(otherParameters.GetObject("Documents"), List(Of finDocumentRO))TaskManagerWorkflows = DirectCast(otherParameters.GetObject("TaskManagerWorkflows"), List(Of finTaskManagerWorkflow))' Add 'Repossession Authority' if not already added and ALL Workflows are for Account Type 'FR'If Documents.Contains(finBL.Documents("RA")) Then' Already contains this DocumentElse' Check we can add this Document (i.e., all Accounts are of type 'RC' or 'FR' in this example)Include = TrueFor Each TaskManagerWorkflow In TaskManagerWorkflowsSelect Case TaskManagerWorkflow.AccountTypeIdCase "FR", "RC"Case ElseInclude = FalseExit ForEnd SelectNextIf Include Then Documents.Add(finBL.Documents("RA"))End IfEnd Select
NOTE: The sample only includes the Document if it is applicable to all selected Workflows.