on 02-06-2018 9:51 AM
Hello Experts,
I have created a simple application in webide where I used query service to get table entries from backend system. I want to perform CRUD operations where I have some queries.
1. As there are two ways by which i can perform update operation using ODATA.update() method or using ODATA.REQUEST() object where we provide requestUri,method. Now my question is whoch method is better or preferred?
2. If we go for ODATA.update() method then how to get and pass XSRF token from header or is it automatically handled?
3. In case of ODATA.REQUEST() method, Is it safe to pass the requesURI value with Server port details.
Can you please provide your expertise on above questions.
Thanks in Advance for your help.
Regards,
Dhiraj
Hello ,
you can try the below code
ODataModel.update(sQuery,oEntry, { //oEntry is the array which I want to export to oData and sQuery is the entityset
method: "PUT",
error: function(e) { alert("error"); },
success: function(data) { alert("success"); } } );
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.