Skip to main content
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",
  • Duncang Profile Picture
    5 on at
    RE: FetchXML join account and contact tables - Web API Postman. "'Account' entity doesn't contain attribute with Name = '_primarycontactid_value'"

    Awesome, that worked, thanks

  • Verified answer
    Guido Preite Profile Picture
    54,082 Moderator on at
    RE: FetchXML join account and contact tables - Web API Postman. "'Account' entity doesn't contain attribute with Name = '_primarycontactid_value'"

    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

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Adis Profile Picture

Adis 136 Super User 2025 Season 1

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 81

#3
Jonas "Jones" Melgaard Profile Picture

Jonas "Jones" Melgaard 77 Super User 2025 Season 1

Product updates

Dynamics 365 release plans