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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Column alias in Xrm.We...
Power Apps
Answered

Column alias in Xrm.WebApi.retrieveRecord

(0) ShareShare
ReportReport
Posted on by 305

Is it possible to have an alias for the columns retrieved in  Xrm.WebApi.retrieveRecord ?

 

This syntax isn't working 

 

Xrm.WebApi.retrieveRecord("jg_tdssection", tdsSectionId, "?$select=jg_rateforindividuals as jg_tdsrate");

 

I have the same question (0)
  • Shashank Bhide Profile Picture
    946 Moderator on at

    that's more an OData query than a Dataverse query and OData committee doesn't support column aliasing yet AFAIK.

     

    https://stackoverflow.com/questions/20666056/alias-in-odata-select-statement

     

  • Rutu01 Profile Picture
    305 on at

    According to the docs here   https://devblogs.microsoft.com/odata/compute-and-search-in-asp-net-core-odata-8/ 

    this should work : 

    GET http://localhost:5102/odata/products?$compute=Price mul Qty as TotalPrice&$select=TotalPrice

    but it didn't for me 

    ?$compute=jg_ratefornonindividuals mul 1 as tdsrate & $select=tdsrate

    I'm getting this error : The query parameter [REDACTED] is not supported

  • Verified answer
    Shashank Bhide Profile Picture
    946 Moderator on at

    that link is from ASP.NET core's OData implementation, different implementers may choose to implement different features, but for Dataverse I didn't see any online documentation which suggests it's available.

     

    using fetchXML though aliasing is supported.

    string fetchXml = @"<fetch top='3'>
     <entity name='account'>
     <attribute name='accountclassificationcode' alias='code' />
     <attribute name='createdby' alias='whocreated' />
     <attribute name='createdon' alias='whencreated' />
     <attribute name='name' alias='companyname' />
     </entity>
     </fetch>";
  • Rutu01 Profile Picture
    305 on at

    I couldn't find any information about alias being supported here https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/query-data-web-api so perhaps it's not

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 103

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
wolenberg_ Profile Picture

wolenberg_ 67 Super User 2026 Season 1

Last 30 days Overall leaderboard