Skip to main content

Notifications

Announcements

No record found.

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

Posted on by 150

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

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Property 'field' on type 'Microsoft.Dynamics.CRM.entity' is not a navigation property or complex property. Only navigation properties can be expanded

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

  • Verified answer
    ishraqiyun77 Profile Picture
    ishraqiyun77 150 on at
    RE: Property 'field' on type 'Microsoft.Dynamics.CRM.entity' is not a navigation property or complex property. Only navigation properties can be expanded

    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

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Property 'field' on type 'Microsoft.Dynamics.CRM.entity' is not a navigation property or complex property. Only navigation properties can be expanded

    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.

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