on 02-13-2019 9:24 AM
Hi All,
I have a requirement where I'm passing multiple rows as JSON from UI to xsodata for performing multiple insert operations. It happens like this UI -> xsodata -> xsjslib -> procedure
The problem here is, I'm not able to insert the multiple row data from UI as I get 'null' oData values
"https://cg06layishrb117a-project-folder-project-ui.s1h1red.com:30033/test.xsodata/AdjMaxVersion('null')"
Below is the response oData
{
"ID" : null,
"NAME" :null,
"EMAIL" :null,
"PHONE_NUMBER" :null,
}
Below is the payload i'm passing
{
"ID" : 1,
"NAME" :"ar",
"EMAIL" :"test",
"PHONE_NUMBER" :"1111",
},
{
"ID" : 2,
"NAME" :"eln",
"EMAIL" :"test",
"PHONE_NUMBER" :"2222",
},
The xsjslib and procedure code are working independently, but the problem is while calling the service from UI, the data is not getting inserted in the tables and I get the NULL return data
1st: You do not need the "('null')" at the end of the endpoint. Adressing the right entity set for the POST is enough.
2nd: You are taking about a procedure, you are meaning a write exit procedure you are using to override the standard insert logic? Can you show your logic for that.
3rd: I is not possible to insert multiple records with one standard POST. Either you have to use single POSTs or you have to use a batch request which bundles the single POSTs. The UI5 OData V2 model supports that already out of the box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.