Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
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,962 Moderator 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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans