Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

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

Posted on by 30

Even though i'm using the Schema name, we are facing the above error in "tasks

URL : https://Domain-url/api/data/v9.0/tasks

REQUEST:

{
"description": "Kiruthiga's Task 3",
"subject": "Kiruthiga's task 3 subject",
"statecode": 0,
"actualdurationminutes" : "20",
"regardingobjectid_contact@odata.bind" : "/contacts(contact_id)",
"ownerid@odata.bind" : "/systemusers(user_id)",
"new_lookup_account@odata.bind" : "/accounts(account_id)" // Error throwing for this custom fields

"new_caseassociate@odata.id" : "/incidents(case_id)" // Error throwing for this custom fields

}

2744.tt.png

I have checked my schema name using https://domain_url/api/data/v9.1/EntityDefinitions(task_meta_id)/Attributes?$filter=IsCustomAttribute%20eq%20true

I have tried new_Lookup_Account too,but no luck also it deosn't make sense.Because im using the above url to get custom fields.so i could olny able to use that schema name alone.

this API returns both logical and schema name are same.

"LogicalName": "new_caseassociate",
"IsValidForForm": true,
"IsRequiredForForm": false,
"IsValidForGrid": true,
"SchemaName": "new_caseassociate",

"LogicalName": "new_lookup_account",
"IsValidForForm": true,
"IsRequiredForForm": false,
"IsValidForGrid": true,
"SchemaName": "new_lookup_account",

*This post is locked for comments

  • Lucas H Profile Picture
    Lucas H 279 on at
    RE: An undeclared property '_new_Lookup_Account' which only has property annotations in the payload but no property value was found in the payload

    FYI for anyone else trying to solve this:

    Adding "_Task" did not work for me.

    My solution was to use the **SCHEMA NAME** and NOT the logical name.

    I.e, my custom field was "new_contact". Using "new_contact@odata.bind" did not work, but using "new_Contact@odata.bind" did.

    Hope this helps someone!

  • Fedorov Profile Picture
    Fedorov 338 on at
    RE: An undeclared property '_new_Lookup_Account' which only has property annotations in the payload but no property value was found in the payload

    Thank God for this thread. I had the same problem, must be something with "Task" being an acitivty-entity or something.

    My field ("new_approvinguser") was having the same problems.

    The suggestion in one of the answers by adding "_Task" to the odata-property helped, hence:

    DOESNT WORK: "new_approvinguser@odata.bind" : "/systemusers(060814F1-48C8-EB11-A999-00505698BCE2)"

    WORKS: "new_approvinguser_Task@odata.bind" : "/systemusers(060814F1-48C8-EB11-A999-00505698BCE2)"

  • Suggested answer
    Vipin J Profile Picture
    Vipin J 1,583 on at
    RE: An undeclared property '_new_Lookup_Account' which only has property annotations in the payload but no property value was found in the payload

    Its a schema naming convention problem.

    I resolve this using OData naming convention

    Refer here for detail: https://vjcity.blogspot.com/2020/05/an-undeclared-property-ccsquoteid-which.html

  • Suggested answer
    kiruthigarani Profile Picture
    kiruthigarani 30 on at
    RE: An undeclared property '_new_Lookup_Account' which only has property annotations in the payload but no property value was found in the payload

    we have achieved this by appending _Task with the schema name ie; new_lookup_account_Task@odata.bind

  • kiruthigarani Profile Picture
    kiruthigarani 30 on at
    RE: An undeclared property '_new_Lookup_Account' which only has property annotations in the payload but no property value was found in the payload

    I have downloaded odata metadata from developer resources, NO LUCK!!
    We are using proper web api to retrieve custom fields, that should return all the details of the field don't know the reason for this issue.

    kindly help us to achieve this by web api without any tools

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    Kalpavruksh D365 CoE 2,545 on at
    RE: An undeclared property '_new_Lookup_Account' which only has property annotations in the payload but no property value was found in the payload
    Hi,
     
    We had this same issue for the custom lookup field.
     
    One of the value from the below list will work for a custom lookup field. 
    1. ReferencedEntityNavigationPropertyName
    2. ReferencingEntityNavigationPropertyName
    3. SchemaName
    4. LogicalName
    Please download Metadata browser and install in your environment. It is an official solution from the Microsoft.
    MicrosoftTeams_2D00_image-_2800_14_2900_.png
    Try to replace the value before @odata.bind.
    MicrosoftTeams_2D00_image-_2800_15_2900_.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans