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:
We 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;
Then 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;
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.