how to retrieve a opetion set value and if condition is true then set another 2 option set value as 'yes'
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.
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);
}
Hello,
pls refer below link,
https://social.microsoft.com/Forums/en-US/a1df6b0c-68bc-4d85-96d8-8461b75031b0/how-to-set-the-two-option-set-value-set-to-yesno-using-if-statement?forum=crmdevelopment
https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/198894/how-to-retrieve-option-set-value
https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/144399/how-to-set-the-option-set-value-dynamically-using-javascript
I hope it helps,Thanks.Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 179 Super User 2025 Season 2
#ManoVerse 110
Gerardo RenterÃa Ga... 61 Most Valuable Professional