I need to run a FetchXml to get the possible Option Set Values, but when I build the FetchXml based on objecttypecodename nothing is returned:
<fetch>
<entity name="stringmap" >
<attribute name="value" />
<attribute name="objecttypecode" />
<attribute name="objecttypecodename" />
<filter type="and" >
<condition attribute="objecttypecodename" operator="eq" value="account" />
</filter>
</entity>
</fetch>
For example this returns nothing. Now if I use objecttypecode and 1 it works, but even in code when I run this and return objecttypecodename as a field it's empty in all cases. I've seen some posts where this is used to select values from StringMap in code for custom lookups and such, but given objectypecode on custom entities can change between organizations I need to somehow query on entityname instead. Any ideas if this is a bug or if someone has other suggestions on how to do this? We're using Dynamics 365 (CRM 2015 - v8) on prem.
Here's an article that actually suggests this method:
https://community.dynamics.com/crm/b/crmtipsfromadeveloper/posts/know-how-d365-crm-get-optionset-label-from-stringmap-using-fetchxml-c-js-ssrs
Thanks.
*This post is locked for comments