CRM 2015 oData Vs CRM 2016 Web API – Part 3 – oData Metadata
When another version of CRM gets out, we all have to learn from 0 few things, and regardless the experience we all have, nobody can deny that sometimes it is frustrating when we experience an error/exception for the first time and more time we spend understanding the "why?" without finding the solution more we feel worst.
To help me on that tedious task of updating or creating records trough the Web API i found my new best friend regarding that matter, the oData Metadata Service.
For who knows CRM, just go to the Settings – Customizations – Developer Resources – Click to download the oData Metadata, i can tell you that will make your life just much easier when dealing with lookups now in CRM when using them in a custom web resource. In there, you will find the object model used by the Web API.
I have found how i could set a value on a lookup field from that file, the lookups are now the navigation properties, and because of that, sometimes, the Navigation Property name for that specific field is just different from what you used before, and in there you will be able to see what is the name you need to use.
Hope it helps.