Search This Blog

Thursday, March 2, 2017

An undeclared property '_new_account_Value' which only has property annotations in the payload but no property value was found in the payload

An undeclared property '_new_account_Value' which only has property annotations in the payload but no property value was found in the payload

I have kti_project entity in which I have account lookup. I want to create a project with value filled in the account lookup .

Code:

    var obj = {};
    obj.new_name = "aaa";
 
   obj["_new_account_Value@odata.bind"]="/accounts("+gId+")"
   

    KTI.WebAPI.Create("new_kti_projects", obj, test, null);

Solution:
The problem is given account lookup key name in the obj property. I have taken the name and given this from https://organization.api.crm8.dynamics.com/api/data/v8.1/new_kti_projects

We have to given schema name of the account lookup.
   obj["new_Account@odata.bind"]="/accounts("+gId+")" ;








No comments:

Post a Comment

Note: Only a member of this blog may post a comment.