WebAPI Query | Dynamics CRM | Error: Property 'field' on type 'Microsoft.Dynamics.CRM.entity' is not a navigation property or complex property

Recently when I was debugging my code I got this error : Property 'field' on type 'Microsoft.Dynamics.CRM.entity' is not a navigation property or complex property'.

Basically in my WebAPI query I was requesting data from Survey entity and also I was trying to read related entity(in my case it is Incident) data values so that I don't have to do another query.

I have this 'Survey' entity and which has a lookup field called 'Regarding' (Schema name: regardingobjectid) which is a and can be related to any system defined entity.

Simply when I used regardingobjectid in my query I got error : "Could not find a property named 'regardingobjectid' on type 'Microsoft.Dynamics.CRM.msdyn_surveyinvite'." I removed this '$select' part from the url and directly run that and found that there is field called '_regardingobjectid_value' which returned guid of that 'Regarding' lookup field.

Now the new error came when I tried to get value from the related entity using this 'Regarding' lookup relation but got the error:  "Property 'regardingobjectid' on type 'Microsoft.Dynamics.CRM.entity' is not a navigation property or complex property. Only navigation properties can be expanded".Here is query url:


https://xxxxxxx.crm5.dynamics.com/api/data/v9.1 + "/msdyn_surveyinvites" + "?$select=activityid&$expand=regardingobjectid($select=_new_companycityid_value)&$filter=aie_caseregion eq " + sRegion + " and new_isSent eq false and createdon ge '" + FromDate + "' and createdon lt '" + ToDate + "' and regardingobjectid/_new_companycityid_value eq B7D6FC62-3AAE-E611-80F1-3863BB2EB860  and statuscode ne 173710009 and statuscode ne 6";



Ideally it should have worked but it was not working in my case. I even replaced that 'regardingobjectid' with '_regardingobjectid_value' but that too didn't worked as '_value' only contains guid.

To use $expand you have to use the schema name or search the 'Partner' value inside the navigation property of your entity and that too is case sensitive. Check metadata for the CRM : https://xxxxxx.crmX.dynamics.com/api/data/v9.1/$metadata



The correct URL:


 https://xxxxxxx.crm5.dynamics.com/api/data/v9.1 + "/msdyn_surveyinvites" + "?$select=activityid&$expand=regardingobjectid_incident_msdyn_surveyinvite($select=_new_companycityid_value)&$filter=aie_caseregion eq " + sRegion + " and new_isSent eq false and createdon ge '" + FromDate + "' and createdon lt '" + ToDate + "' and regardingobjectid_incident_msdyn_surveyinvite/_new_companycityid_value eq B7D6FC62-3AAE-E611-80F1-3863BB2EB860  and statuscode ne 173710009 and statuscode ne 6";



Comments

  1. Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.https://www.all-laptopbattery.com

    ReplyDelete
  2. Thanks for sharing your
    knowledge realted to programming

    ReplyDelete
  3. The T-Shirt At The Best Prices On The T-Shirt
    At T-Shirt At The titanium price per ounce Best Prices On The T-Shirt: The T-Shirt. titanium dive knife From $35.99 a piece. On sale at Best Price. Share titanium rimless glasses on your titanium ring blog or used ford escape titanium Facebook page

    ReplyDelete
  4. The pricing of Matty Boy pieces reflects its positioning in the high-end, limited edition niche of the fashion world. Many items command premium prices — for instance, specialty jeans and designer accessories from the site are offered at elevated rates, consistent with limited production and exclusivity.

    ReplyDelete
  5. Kroen might also be a person — a visionary, perhaps, whose ideas changed the way people see the world. In literature, the character of Kroen could stand as a symbol of duality: half hero, half philosopher. Their pursuit isn’t fame or fortune but understanding. To read about Kroen is to watch someone wrestle with meaning itself — always questioning, never settling, but somehow finding peace in uncertainty.

    ReplyDelete
  6. HMDD positions itself as a premium streetwear label. Price tags for many items are higher than mainstream fast fashion,

    ReplyDelete
  7. I wasn’t expecting the range of products to be this wide. From prints and posters to streetwear and collectible figurines, there's something for every type of fan.

    ReplyDelete
  8. One thing I admire about Trapstar is their connection to UK culture. They represent London in a raw, authentic way, and you can see that influence in their designs and overall vibe.

    ReplyDelete
  9. Davril is not just about style; it also focuses on sustainable fashion. Many of their clothing items are made from eco-conscious materials, and the use of supply code promotions further encourages consumers to choose sustainable options without worrying about high prices.

    ReplyDelete
  10. I’m still mad I missed out on the Donda merch drop. The designs were so clean — all-black with gothic lettering and subtle nods to the themes of the album.

    ReplyDelete
  11. One of the best things about the God Speed Hoodie is how versatile it is. You can wear it to the gym, while traveling, or just lounging around.

    ReplyDelete
  12. Kapital’s identity seems to evolve rather than stay static. Some seasons lean heavier into denim, others into printed fleeces, bandana motifs, or outerwear experiments.

    ReplyDelete
  13. The quality surprised me — in a good way. The stitching is clean, and the fabric feels durable, not cheap like some trendy hats. Definitely worth the price for a piece that makes a bold fashion statement.

    ReplyDelete
  14. What I admire most about Corteiz is how it taps into London’s raw creative energy. From the pop-ups to the marketing tactics, it feels like something built by the streets, for the streets. Not every brand has that authenticity.

    ReplyDelete
  15. I really like how the Civil Regime shirt blends minimalist streetwear with bold, meaningful graphics. Fashion that makes a statement without being too loud is hard to pull off, but this brand seems to get it right.

    ReplyDelete
  16. Beyond social interaction, simple akimbo has found a place in the world of visual storytelling.

    ReplyDelete
  17. the concept of seven heavens is deeply embedded in the Qur'an and Hadith. These heavens are described as seven distinct layers or realms created by Allah, each with its own characteristics and inhabitants.

    ReplyDelete
  18. Unlike many global perfume houses that focus solely on mass-market appeal, Lattafa embodies the rich heritage of Arabian scent-making.

    ReplyDelete
  19. Its soft cotton blend feels indulgent against the skin, providing unmatched comfort while exuding high-fashion credibility.

    ReplyDelete
  20. This Trapstar backpack is 🔥. The design is clean but still carries that signature Trapstar attitude. I love how it's both functional and stylish — perfect for everyday use or just completing a streetwear fit.

    ReplyDelete
  21. Essentials Canada has emerged as a key player in the Canadian retail market, positioning itself as a one-stop solution for everyday needs and lifestyle essentials.

    ReplyDelete
  22. Just got my Alchamai hoodie last week and I’m honestly obsessed. The material is way softer than I expected, and the fit is perfect—super cozy without being bulky. Definitely my new go-to for fall.

    ReplyDelete
  23. Pokémon Center stores are predominantly located in Japan, the online platform has expanded its reach globally.

    ReplyDelete
  24. Just when I thought coats were starting to feel repetitive, Sean John drops this. The attention to detail is impressive—from the stitching to the silhouette, everything looks intentional.

    ReplyDelete
  25. Joining Mr. Winston's membership program can unlock additional savings opportunities. Members often receive exclusive discount codes, early access to sales, an

    ReplyDelete
  26. What sets the brown Essentials hoodie apart from other hoodies on the market is its remarkable versatility. The earthy brown hue serves as a perfect neutral base that pairs effortlessly with denim, cargo pants, or even tailored trousers.

    ReplyDelete
  27. One thing that stands out about Pink Palm Puff is how inclusive their sizing is. It’s so important for fashion brands to embrace all body types, and I’m glad to see them leading the way with flattering

    ReplyDelete
  28. Denim Tears hoodies are distinguished by their thoughtful design and craftsmanship. They often feature premium heavyweight cotton, vintage-inspired washes, and intricate embroidery that adds depth to the storytelling.

    ReplyDelete
  29. JednÄ… z ciekawych cech spodni Stone Island jest różnorodność linii i projektów – od modeli sportowych i dresowych, przez wojskowe czy cargo

    ReplyDelete
  30. Every black SP5DER tracksuit reflects a meticulous balance between comfort and bold design. The tailoring emphasizes structure without sacrificing movement, with premium materials that blend softness, stretch, and durability.

    ReplyDelete
  31. Comme des Garçons was founded in Tokyo in 1969 by Rei Kawakubo, a visionary designer who has long defied the conventions of fashion.

    ReplyDelete
  32. There is a strange, beautiful power in sisters who seek the unknown together.

    ReplyDelete
  33. Sp5der is a streetwear brand founded in 2019 by the rapper Young Thug (Jeffery Lamar Williams).

    ReplyDelete
  34. What makes Godspeed Apparel distinctive in the saturated streetwear market is its ability to merge fashion with philosophy.

    ReplyDelete
  35. Fake gods are anything or anyone that people place in the position of ultimate authority, trust, or reverence above truth, morality, or the divine. In ancient times, these included carved idols of wood, stone, or metal, representing gods of fertility, war, rain, or the sun.

    ReplyDelete
  36. In the world of street fashion, few brands have managed to capture the essence of urban culture quite like Trapstar. Known for its gritty aesthetic, rebellious slogans, and association with music and celebrity culture, Trapstar has evolved from a London-based underground label to a global streetwear powerhouse. At the heart of its iconic lineup lies the Trapstar hoodie — a garment that symbolizes not just style, but a lifestyle.

    ReplyDelete
  37. The denim and leather jacket remains a timeless piece for every generation. It embodies independence strength and creativity. No matter how trends change this jacket never loses its spirit.

    ReplyDelete
  38. SMM Panel Indonesia Termurah seems like a smart solution for anyone looking to grow their social media presence affordably. The key is research: check reviews, start with smaller packages

    ReplyDelete

Post a Comment

Popular posts from this blog

Search data in Gridview on Textbox Key press event using JQuery in Asp.Net- C#

StateCode and StatusCode Values for mostly used entities in Microsoft Dynamics CRM 2013

Dumps for Microsoft Dynamics CRM MB2-703 Practice Exam Questions Free

How to import CSV files into DataTable in C#

How to show enlarge image when mouse hover on image or link in Asp.Net(c#) using JavaScript

go to top image