/scripts/ahub.form.attachments.js
0

sap.ui.model.odata.ODataModel Passing Expand paramaters

Apr 06, 2017 at 11:00 AM

101

avatar image
Former Member

Hi Experts ! I want to pass expand parameters to odatamodel.Read beacause if Call the service like this

var oModel1 = this.getOwnerComponent().getModel();
oModel1.read("/LinesSet?$expand=ToCells"


it didnt work

It Calls just LineSet get entitySet and without expand

any idea please

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Akhilesh Upadhyay Apr 06, 2017 at 12:28 PM
1

try this if it works,

oModel1.read("/LinesSet", {
    urlParameters: {
        "$expand": "ToCells"
    },
    success: function(data, response) {
    },
    error: function(oError) {
    }
});
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Dear Akhilesh ,
Thanks a lot

Finaly it works

0
Jun Wu Apr 06, 2017 at 11:25 AM
1
oModel1.read("/LinesSet",{ parameters: {expand: "ToCells"}}}

give it a try.

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content