how to retrieve a opetion set value and if condition is true then set another 2 option set value as 'yes'
how to retrieve a opetion set value and if condition is true then set another 2 option set value as 'yes'
Hello,
pls refer below link,
I hope it helps,
Thanks.
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365
Hi Shweta,
Assuming you are working with custom workflow as you have tagged SDK, you can simply get your option set value like below and similarly set another attributes something like this
if(EntityObject.Contains("OptionsetFieldName")
{
int _value=EntityObject.GetAttributeValue<OptionSetValue>("OptionsetFieldName").Value;
if(_value==YOUR_Check)
{
EntityObject["OtherOptionsetFieldName"] = new OptionSetValue(VALUE_YOUWANTOSET);
}
}
Hi Shweta Pawar,
In your Workflow(WF) add a new Check Condition and in it's properties validate the optionset value and set the desired value.
then add a new Update Records and in its properties set the values of other field as yes
then save and activate your WF.
regards.
André Arnaud de Cal...
292,688
Super User 2025 Season 1
Martin Dráb
231,643
Most Valuable Professional
nmaenpaa
101,156
Moderator