on 10-10-2018 10:37 AM
Hello,
Been researching a lot but could not find anywhere.. How do I pass more than one key in the getProperty method of my ODataModel object?
My codes below result to undefined
oModelx.getProperty("/Order_Details('10248')")
oModelx.getProperty("/Order_Details(OrderID=10248,ProductID=11)")
oModelx.getProperty("/Order_Details(OrderID='10248',ProductID='11')")
I thought maybe because the Entity has 2 keys per its metadata.
I'd like to get the data using 2 properties as the selection criteria.
Thanks!
Michael
I found the issue.. I had to read the EntitySet first using this code below.
oModelx.read(
"/Order_Details",
{
method: "GET",
success: function(oData2, oResponse) {
//Create JSON Model
console.log("Success!");
},
error: function(oError) { console.log("Error!"); }
});
Then this code below started to work.
oModelx.getProperty("/Order_Details(OrderID=10248,ProductID=11)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.