Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Suggested answer

how to retrieve a option set value in workflow

Posted on by 20

how to retrieve a opetion set value and if condition is true then set another 2 option set value as 'yes'

  • Suggested answer
    CRMJetty Profile Picture
    CRMJetty 3,508 on at
  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,041 on at
    RE: how to retrieve a option set value in workflow

    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);

    }

    }

  • Suggested answer
    PabloCRP Profile Picture
    PabloCRP 1,086 on at
    RE: how to retrieve a option set value in workflow

    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.

    pastedimage1613019601441v1.png

    then add a new Update Records and in its properties set the values of other field as yes

    pastedimage1613019733061v2.png

    then save and activate your WF.

    regards.

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.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans