Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

xrm.webapi.retrieveMultipleRecords fetchxml results symbols

Posted on by Microsoft Employee

I apologize for asking about debugging but, I can't figure out or find documentation for the symbols in the result.  How do I read/use the link-entity attributes?  This works fine down to the red line.  Then I'm lost:fetchSymbolitry.PNG I've tried dereferencing sub, product, substituteproduct.  A little help please.

dupeRelatedProducts.PNG

  • Suggested answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    RE: xrm.webapi.retrieveMultipleRecords fetchxml results symbols

    HI, 

    You need to use below syntax:
    result.entities[index]['aliasname.fieldlogicalname']

    Example.

    pastedimage1640109298046v1.png

    Thanks.

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: xrm.webapi.retrieveMultipleRecords fetchxml results symbols

    Hi,

    Can you please try below code to get linked entity attribute value

    var response=result.entities[0];

    var companyid=response.sub.msdyn_companyid;

    same code for itemnumber.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: xrm.webapi.retrieveMultipleRecords fetchxml results symbols

    I have a theory why none of these things work and there are no examples.  Microsoft never implemented them into Xrm.Webapi.  No link-entity/aliased values delivered.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: xrm.webapi.retrieveMultipleRecords fetchxml results symbols

    I'm in javascript not .NET

  • mvilas02 Profile Picture
    mvilas02 356 on at
    RE: xrm.webapi.retrieveMultipleRecords fetchxml results symbols

    Hi ,

    you can try this syntax

    ((AliasedValue)entity.Attributes[“msdyn_itemnumber”]).Value

    Regards,

    Vilas

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans