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 CRM (Archived)

Property 'field' on type 'Microsoft.Dynamics.CRM.entity' is not a navigation property or complex property. Only navigation properties can be expanded

(0) ShareShare
ReportReport
Posted on by 154

Running into this issue in Dynamics 365 that seems like it should be working, but gives me:

Property '_biz_buyerlookupid_value' on type 'Microsoft.Dynamics.CRM.biz_productbuyer' is not a navigation property or complex property. Only navigation properties can be expanded.

I can copy the example provided here and it works find:

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/webapi/query-data-web-api#retrieve-related-entities-by-expanding-navigation-properties

Basically trying to read in related fields so I don't have to do another query.

So I have a look up field in a custom entity called Product Buyer, or biz_productbuyers, to bring in the Contact name associated with that Product.

The field is called biz_buyerlookupid when you look at fields for the entity.

When you use the web API, it says nothing called biz_buyerlookupid exists in that entity. Get rid of the $select= and run it wide open so I can search for it.

There is a field called _biz_buyerlookupid_value. I put that into the $select and it returns:

{
    @odata.etag: "W/"20636204"",
    _biz_buyerlookupid_value: "906595fd-2a83-dc11-ae20-000feaed3854",
    biz_productbuyerid: "8be67d14-9efb-4335-98c7-000451a50cef",
}

Apparently some kind of relationship between the two fields, but it sounds like the _biz_buyerlookupid_value is the lookup to Contacts. The _biz_buyerlookupid_value does correspond with an actual value in the contact entity, namely a single contactid. I checked. Have tried all of the following and have received the preceding message:

/api/data/v9.0/biz_productbuyers?$select=_biz_buyerlookupid_value&$expand=_biz_buyerlookupid_value($select=contactid, fullname)

/api/data/v9.0/biz_productbuyers?$select=_biz_buyerlookupid_value&$expand=biz_productbuyerid($select=contactid, fullname)

/api/data/v9.0/biz_productbuyers?$select=biz_productbuyerid&$expand=biz_productbuyerid($select=contactid, fullname)

/api/data/v9.0/biz_productbuyers?$select=biz_productbuyerid&$expand=_biz_buyerlookupid_value($select=contactid, fullname)

So what is going on here? It should be bringing in the contactid and fullname from the contactentity as best as I can tell.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    It appears that you are not the only one who got this error. Check below thread. I tried myself and got the same error for custom entity with a contact lookup but surprisingly account with primary contact lookup works fine.

    community.dynamics.com/.../190568

    The recommendation in the above thread is to use fetchxml which should work fine and you still get your required fields in a single query.

    Hope this helps.

  • Verified answer
    ishraqiyun77 Profile Picture
    154 on at

    Hi Ravi, thanks for the reply. I actually did happen to figure out my issue. I'll link to the StackOverflow question I had regarding it. Hopefully it is useful:

    stackoverflow.com/.../53754006

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    That's great. Please mark your response as answer so that it can help others as well :)

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans