1.I want a code to get Global Option Set text based on Global Option set value in plugin.
2.I want a code to get Local Option Set text based on Local Option set value in plugin.
*This post is locked for comments
Thank you
Hi Akash
Yup.
Btw you can use to retrieve all the label like USA and Russia and so on from this code
foreach (OptionMetadata optionMetadata in optionsetMetadata.Options)
{
if (optionMetadata.Value == optionsetValue)
{
optionsetText = optionMetadata.Label.UserLocalizedLabel.Label;
return optionsetText;
}
}
You just dont need to stop it under the if
No need this one
if (optionMetadata.Value == optionsetValue)
Just return the whole list.
Hopw this helps you.
Thank you.
Thank you maniraj
Aileen gusni...thank you....but can I use it for both local and global option set.....Here there is one more requirement... I want to fetch all the labels of option set...suppose option set is country it has values such as USA,Russia and so on. I want to retrieve all the values and label text of option set
Hi Akash
You can use for both here
[View:http://www.codeproject.com/Tips/553178/Get-the-OptionsetValue-and-OptionsetText-for-Dynam]
Thanks
Hi Akash,
Try this below link..
nishantrana.me/.../get-optionset-label-using-formattedvalues-property-of-entity-in-plugin-in-crm
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... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156