on 07-26-2017 1:58 PM
The error is found after debugging ie http: 415 unsupported media type this is the error am getting.
The code is here:
getTileCount: function(othis)
{ var that = this; var url = "/EQ_EquipmentAssignment/$count/?$filter=IsDeleted eq false;
return new Promise(function(resolve, reject)
{
that.oModel.read(url, null, null, false ,
function(oResponse) { resolve(oResponse); }, function(e) { reject(e); }); }); },
Use below code:
that.oModel.read("/EQ_EquipmentAssignment", {
urlParameters: {
"$inlinecount": "allpages"
},
filters: [
new sap.ui.model.Filter("IsDeleted", "EQ", false)
],
success: function(oData, Response){
var nCount = oData["__count"];
alert(nCount);
}
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
var that = this; var url = "/EQ_EquipmentAssignment/$count/?$filter=IsDeleted eq false; - Is this line of code correct? Seems like an additional "/" before the "?". Remove it and test.
Regards,
Sharath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's an example
Regards,
Jamie
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.