TIP: Setting Value for Option Set in OOB Workflow

By | July 26, 2017

Introduction:

Recently we had a business requirement to maintain Opportunity Status change history. So, to achieve this, we created a custom entity and developed the OOB workflow to create a custom entity record and Send an email to the owner.

First, we created a custom entity ‘Opportunity Status History’ with the below-mentioned fields;

1. Opportunity Lookup (to maintain 1:N relationship between Opportunity and Opportunity Status History)

2. Approver (User Lookup)

3. Approved On (Date Time Field)

4. Status (Option Set)

The Status field is an Option Set. We created two fields for the Opportunity and Opportunity Status History entity with the same Options respectively as shown in the below screenshot;

Status Field on Opportunity Entity:

TIP: Setting Value for Option Set in OOB Workflow in Dynamics 365Status Field on Opportunity Status History:

Setting Value for Option Set in OOB Workflow in Dynamics 365We developed an OOB workflow that will create an Opportunity Status History record. However, we were facing an issue while setting the value to the Status Option set field using OOB workflow attributes. The attribute drop-down is null even if both the fields have the same option set values as seen in the screenshot below;

Setting Value for Option Set in OOB Workflow in Dynamics 365To resolve this issue we created a Global Option Set field for the Status field in Dynamics CRM as seen in the screenshot below;

Setting Value for Option Set in OOB Workflow in Dynamics 365Then we deleted the existing status fields from the Opportunity and Opportunity Status History entity and created new fields using the Global Option set for the both entity as shown in the screenshot below;

Setting Value for Option Set in OOB Workflow in Dynamics 365Now we were able to map the Status field on Opportunity Status History entity using OOB workflow attribute

Setting Value for Option Set in OOB Workflow in Dynamics 365Conclusion:

We can only map the Option Set value in OOB workflow if it is Global Option Set and not for the Option Set fields having same values.

Dynamics CRM QuickBooks Integration

Leave a Reply