25 Nov’19

D365 GeneralSet Lookups in Xrm.WebApi D365 v9 correctly

Using Xrm.WebApi needs you to be careful with the field names and what to use when. Especially, when you are dealing with Lookups.

One of the most common errors you’ll come across is the one like below – “An undeclared property (fieldname you entered) which only has property annotations in the payload but no property value was found in the payload.

error

This is confusing as to what needs to be put in while setting the lookup.

If you have done the below, entered the name of the field which is all in small caps  –

object[“msdyn_resourcerequirement@odata.bind”] = “/msdyn_resourcerequirements(<Guid>)”;

This will result in the above error!!!

 

You’ll need to put the Schema name of the lookup field instead and this should solve your problem –

correctName.png

and the code should look like this –

object[“msdyn_ResourceRequirement@odata.bind”] = “/msdyn_resourcerequirements(<Guid>)”;

And this should totally work for you!!

Hope this helps! 🙂

Written by

Priyesh Wagh

Sr. Software Developer

Leave a Reply

Your email address will not be published. Required fields are marked *

Want to streamline your business processes?

  • This field is for validation purposes and should be left unchanged.

Recent Articles

  • How to create Dynamics 365 Finance & Operations (formerly Dynamics AX) connection in SSIS

    12 December’ 2019

    Introduction: Creating a Connection is one of the first Steps during the integration of data. While performing Integrati...

    Read more
  • How to create AX (D365 F&0) Connection in SSIS

    12 December’ 2019

    Introduction: Creating a Connection is one of the first Steps during integration of data. While performing Integration w...

    Read more
  • First cut review of new D365 Project Service

    12 December’ 2019

    The new Project Service coming up is a much-advanced version of PSA. Even more, than it will be called as Project Servic...

    Read more
  • Business Central Wave 2 Features – Section 4

    11 December’ 2019

    Introduction: In this blog, I will be attempting to provide information about the new Modern Client features of Business...

    Read more
  • Business Central Wave 2 Features – Section 5

    11 December’ 2019

    Introduction: In this blog, I will be attempting to provide information about the new Modern Client features of Business...

    Read more

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close