Dynamics 365 - One thing you must know about FormattedValues["new_optionset"]

For all of the Dynamics 365 and Dynamics CRM technical consultants and developers, when you are developing a plugin, or an integration between the Dynamics 365 or CRM with a third party application, and you want to take the value of a selected option from an option set, If you want the Dynamics 365/CRM application to run in multi languages(I'm paying you the compliment that you will do the translation for the labels including the option set values) using FormattedValues will return the selected text of the option set in the language the integration user is using, or using plugins the logged in user is using.



For example, I was working with a SharePoint team to display a selected value text into SharePoint from the CRM, and I was using the FormattedValues, in the CRM there is two languages English and Arabic, when I switched the integration user to use the Arabic language in the CRM just to make sure the Arabic labels is translated correctly, and then SharePoint developers was calling me that the selected options are showing in Arabic even if they are using English Language in SharePoint.

So switching the user back to English will solve the problem, so what if you want to switch the selected value to Arabic when the SharePoint is being used in Arabic?!

FormattedValue in this case is not practical, just use the selected value, and then choose the right text to display.

Hope this helps!

Thanks :)

Comments

Popular Posts