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:
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";
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
ReplyDeleteThanks for sharing your
ReplyDeleteknowledge realted to programming
The T-Shirt At The Best Prices On The T-Shirt
ReplyDeleteAt 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
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.
ReplyDeleteKroen 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.
ReplyDeleteHMDD positions itself as a premium streetwear label. Price tags for many items are higher than mainstream fast fashion,
ReplyDeleteI 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.
ReplyDeleteOne 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.
ReplyDeleteDavril 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.
ReplyDeleteI’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.
ReplyDeleteOne 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.
ReplyDeleteKapital’s identity seems to evolve rather than stay static. Some seasons lean heavier into denim, others into printed fleeces, bandana motifs, or outerwear experiments.
ReplyDeleteThe 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.
ReplyDeleteWhat 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.
ReplyDeleteI 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.
ReplyDeleteBeyond social interaction, simple akimbo has found a place in the world of visual storytelling.
ReplyDeletethe 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.
ReplyDeleteUnlike many global perfume houses that focus solely on mass-market appeal, Lattafa embodies the rich heritage of Arabian scent-making.
ReplyDeleteIts soft cotton blend feels indulgent against the skin, providing unmatched comfort while exuding high-fashion credibility.
ReplyDeleteThis 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.
ReplyDeleteEssentials 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.
ReplyDeleteJust 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.
ReplyDeletePokémon Center stores are predominantly located in Japan, the online platform has expanded its reach globally.
ReplyDeleteJust 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.
ReplyDeleteJoining Mr. Winston's membership program can unlock additional savings opportunities. Members often receive exclusive discount codes, early access to sales, an
ReplyDeleteWhat 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.
ReplyDeleteOne 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
ReplyDeleteDenim 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.
ReplyDeleteJednÄ… z ciekawych cech spodni Stone Island jest różnorodność linii i projektów – od modeli sportowych i dresowych, przez wojskowe czy cargo
ReplyDeleteEvery 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.
ReplyDeleteComme des Garçons was founded in Tokyo in 1969 by Rei Kawakubo, a visionary designer who has long defied the conventions of fashion.
ReplyDeleteThere is a strange, beautiful power in sisters who seek the unknown together.
ReplyDeleteSp5der is a streetwear brand founded in 2019 by the rapper Young Thug (Jeffery Lamar Williams).
ReplyDeleteWhat makes Godspeed Apparel distinctive in the saturated streetwear market is its ability to merge fashion with philosophy.
ReplyDeleteFake 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.
ReplyDeleteIn 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.
ReplyDeleteThe 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.
ReplyDeleteSMM 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