web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

fetchxml alias

(0) ShareShare
ReportReport
Posted on by 2,510

Hi, are we able to use alias for attributes? It seems like fullname attribute disappear if I use alias.

<fetch mapping="logical" output-format="xml-platform" version="1.0" distinct="false" >
    <entity name="contact" >
        <attribute name="fullname" alias="aliasname" />

    </entity>
</fetch>


*This post is locked for comments

I have the same question (0)
  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Hi sdnd,

    There is an "alias" parameter, but I am not sure this that is what you are looking for.

    Why do you need other names? Attribute display names will show up in the view column headers (that will never be new_, that will be a display name). In the custom SSRS reports, you can give those columns whatever name you choose. Take a look at the following article:

    mscrmtutorials.blogspot.ca/.../using-alias-in-ms-crm.html

    Hope this helps.

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Hi sdnd,

     it does not disappear - if you are using FetchXml tester, it just does not work with the aliases properly, it seems.

     Try this kind of url, and you'll see those aliased values:

    https://<ORG_URL>/api/data/v8.2/contacts?fetchXml=<fetch mapping='logical' output-format='xml-platform' version='1.0' distinct='false' >    <entity name='contact' >        <attribute name='fullname' alias='test'   />    </entity></fetch>

  • Verified answer
    Nithya Gopinath Profile Picture
    17,078 on at

    HI,

    We are able to use alias for attributes but we need to read the attribute values with the Alias name instead of the attribute name.

    See: community.dynamics.com/.../use-of-alias-in-fetchxml

    Hope this helps.

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi ,

    Using alias the actual attribute name will replace with the alias name of the attributes in the Entity Collection as like as SQL query alias.

    Please find below screenshot.

    ALIAS.JPG

    Hope this will answer your question.

    Please mark as answer if this help.

    Thanks

    Goutam

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans