In this article we will see how to get the values of a multi-select option set attribute within a workflow using the community utility Dynamics-365-Workflow-Tools GetMultiSelectOptionSet:
In our above example, the workflow “Assign task for regulated Opportunities based on Economic Activities” will check the values of the multi-select option set attribute “Economic Activities” and it will assign a task accordingly.
This custom workflow activity requires the following input parameters:
- Source Record URL (required): the URL of the record where the corresponding attribute is located.
- Attribute Name (required): logical name of the attribute whose values are going to be retrieved.
- Fail on Exception (optional):
this is a secondary attribute which allows you to indicate if the activity will throw an exception if something goes wrong or it will just return the error in an output parameter
The output parameter Selected Values returns a string with the corresponding results separated by comma. So that you can check them using the contains operator for example.
If you have found this utility helpful and you want to use it, you just need to install the latest version of Dynamics-365-Workflow-Tools and add the GetMultiSelectOptionSet step into your workflow: