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 365 | Integration, Dataverse...
Answered

FetchXML join account and contact tables - Web API Postman. "'Account' entity doesn't contain attribute with Name = '_primarycontactid_value'"

(0) ShareShare
ReportReport
Posted on by 5

I'm using this fetchXml query (in Postman)

<fetch mapping='logical'>
   <entity name='account'>
      <attribute name='accountid'/>
      <attribute name='name'/>
      <attribute name='accountnumber'/>
      <link-entity name='contact' alias='contact' to='_primarycontactid_value' from='contactid' link-type='inner'>
        <attribute name='fullname'/>
      </link-entity>
</entity>
</fetch>
But getting

{
    "error": {
        "code""0x80041103",
        "message""'Account' entity doesn't contain attribute with Name = '_primarycontactid_value' and NameMapping = 'Logical'. MetadataCacheDetails: ProviderType=Dynamic, StandardCache=True, IsLoadedInStagedContext = False, Timestamp=92819704, MinActiveRowVersion=92819704, MetadataInstanceId=19179712, LastUpdated=2022-12-18 11:07:37.753, OrgId=e1a01dd8-fc2e-4f46-a97d-d3c35656546e"
    }
}
Though when I query accounts, I see that column:
"_primarycontactid_value""6693722c-db76-ed11-81ac-002248933e1f",
I have the same question (0)
  • Verified answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    inside fetchxml queries you need to use the logicalname (in your case primarycontactid) not the syntax you use in OData queries.

    To build fetchxml queries you can use Advanced Find or FetchXML Builder inside XrmToolBox

  • Duncang Profile Picture
    5 on at

    Awesome, that worked, thanks

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 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans