Tuesday, 8 May 2018

Get OptionSet Text and value using custom workflow in Dynamic CRM

retrieve the value selected in optionset field and display ita value in a text field

Description:
In this example we explain that how to get OptionSet value using Custom workflow in Dynamic CRM or Dynamic 365.or how to get or set the OptionSet Text and Value in Dynamic CRM using custom workflow activity. Or getting optionset value in custom workflow using dynamic crm. or get option set value and set option set value in custom workflow.

So here we demonstrate that how to retrieve the value of the selected oprionset field and display it in text field using custom workflow in dynamic crm. Below is the code to get the Text and value of the optionset field in Dynamic CRM using custom workflow.
Code:

Getting the option set value

int value = ((OptionSetValue)entity["yourattributename"]).Value;

For getting the optionset text

 String text = entity.FormattedValues["yourattributename"].ToString();




This entry was posted in :

0 comments:

Post a Comment