What is “Does not support untyped value in non-open type” ODataException in creating records in D365 CE?

One of the most common errors we come across while calling API to create records in Dynamics but isn’t clear what it means? One such issue is – “An error occurred while validating input parameters: Microsoft.OData.ODataException: Does not support untyped value in non-open type.

On the console of the browser, you’ll see this –
consoleLoggedError

But, if you open the <objectName>.responseText of the Failure message of the call, you’ll see the below –

originalErrorA more zoomed view of the error would be below –

badRequest

This is because of my typo in the code [Which is the case for most scenarios] where you mistype a name of the field and neither does the error itself doesn’t specify which field you’re missing out on nor what it means!

Reason

This is because of a simple typo  in one of the fields in the object I was creating using AJAX

faultLine

In my case, this should have been “entity.duration” and not “entity.durationn“.

It was a simple issue which led me wander troubleshooting in areas which I shouldn’t look into.

Hope this saves you some valuable time! Happy 365ing!

One thought on “What is “Does not support untyped value in non-open type” ODataException in creating records in D365 CE?

Leave a Reply to What is “Does not support untyped value in non-open type” ODataException in creating records in D365 CE? - 365 Community Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.