Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

How to retrieve optionset value or optionset selected text using plugin?

$
0
0

hi all,

please suggest me how to retrieve optionset value or optionset selected text using plugin.

i tried below code but not working,throwing an error "given key was not present in dictionary"

foreach (Entity results in collection.Entities)
{

string status = results .FormattedValues["tj_status"].ToString(); 

int status = ((OptionSetValue)results.Attributes["tj_status"]).Value;

}

Thanks!


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images