04-18-2023 11:54 AM - last edited on 05-02-2023 11:03 AM by JackLacava
Hi All,
Is there a possibility to update WFScenario for all users of the application from back end through a Business Rule?
When moving the app from one quarter to another for Financial Regional planning, some of the not so tech savvy Sales users are forgetting to change their WFScenario and triggering the calculations which are erroring out due to older scenarios being locked. We would like to have Admin update WFScenario for all the users of the application as a maintenance task.
Please let me know if the below would work for all the users.
Or any other leads would also be appreciated.
04-18-2023 12:07 PM
BRApi.Workflow.General.SetSelectedWorkflowView(si, profileName, scenarioName, timeName)
followed by refreshing the application through extender rule worked fine.
'Can be called from a dashboard extender business rule:
Dim selectionResult As New XFSelectionChangedTaskResult()
selectionResult.WorkflowWasChangedbyBusinessRule = True
Return selectionResult
No further assistance needed on this thread.
04-19-2023 09:33 AM
Hello,
I think we celebrated too soon.
BRApi.Workflow.General.SetSelectedWorkflowView(si, profileName, scenarioName, timeName)
This statement is setting WorkflowView only for current user, not all users. Has anyone forced Workflow settings refresh for all the users?
05-09-2023 07:19 AM
Each user's default workflow setting is stored in the WorkflowView.xml file in the File Explorer (see screen shot). Unfortunately, there is no built-in call to update this for each user. You would need to build a rule to loop over the XML file for all users and modify each. You would also need to be careful not to assign a scenario that a user does not have access to view.
Something similar to this is done in the AST solution where the default home page is updated in the UserAppSettings.xml file in the same folder.