Hello everyone,
I am currently programming a field PCF for an entity that contains a custom polymorp look up. Among other things, this can have a systemuser as value. I have to update the polymorpic column asynchronously. Unfortunately I have encountered a problem. The logical name of my column is "lehfsma_locationid". If I now try to change the field via webAPI.updateRecord with the following data value:
"lehfsma_locationid@odata.bind": "/systemusers(9BE2A0B8-BE1F-EF11-840B-0022489CF1FD)"
I get an error:
Error identified in Payload provided by the user for Entity :'', For more information on this error please follow this help link https://go.microsoft.com/fwlink/?linkid=2195293 ----> InnerException : Microsoft.OData.ODataException: An undeclared property 'lehfsma_locationid' which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values.
However, if I change the owner instead of my field with :
"ownerid@odata.bind": "/systemusers(9BE2A0B8-BE1F-EF11-840B-0022489CF1FD)"
it works. Where is my error or is the WebAPI not yet able to update custom polymorphic columns?
Greetings Flo
I solved it myself.
With custom polymorphic fields you have to specify the type.
"lehfsma_LocationId_systemuser@odata.bind": "/systemusers(9BE2A0B8-BE1F-EF11-840B-0022489CF1FD)"
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
82
Super User 2025 Season 1
MS.Ragavendar
72