Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10548

Re: Need help with Create/Update/Post of OData service

$
0
0

Hi Kell,

 

You can pretty much ignore the CRUD related fields because they do nothing in the backend. You can create a value in any property regardless of it being set to 'Createable'.

 

When you POST an entity, the server needs to know what the key (URI) of this resource is going to be unless it is a server-assigned address (in this case it is not, if it were a GUID, it would be). Not sending all key property values is breaking the rule and causing it to break during parsing. If you have values like 'userid', then yes the backend could use sy-uname and you don't need to send it, but you do need to have the property in the content list even if it is empty. The additional problem with date-time is that GW doesn't like properties of this type to be nulled unless it is set to 'is-nullable' (and why would you specify a key value that is going to be a null?).

The only time you don't need to send all properties is when you update with a PATCH operation.

 

Regards

 

Ron.


Viewing all articles
Browse latest Browse all 10548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>