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
}
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
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!
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)"
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
we have achieved this by appending _Task with the schema name ie; new_lookup_account_Task@odata.bind
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156