Search code examples
javascriptc#dynamics-crmmicrosoft-dynamics

Dynamics CRM web api FetchXml returns linked Entities naming with '2_x002e_' and similar in between


Is there any way to bypass that returned values of fetchXML returns correct naming of linked entity logical name, not build naming, like :

customer_contact1_x002e_contactid
customer_contact1_x002e_fullname  

I removed all aliases from requests. Is it something, that can not be fixed in request? Or is it a 'tail' putted by Microsoft CRM to specify entities relationships and all I can do is to work with that in response?


Solution

  • The _x002e_ represents the dot (.) which separates the prefix from the attribute name. (It's the character code in hexadecimal form.) In JSON the unencoded dot would lead to conversion errors.

    You could consider to convert the hex code to any text using a JSON reviver function. (See MDN.)