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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,532 Super User 2024 Season 2
Martin Dráb 228,501 Most Valuable Professional
nmaenpaa 101,148