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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 06, 2017 at 12:28 PM

    try this if it works,

    oModel1.read("/LinesSet", {
        urlParameters: {
            "$expand": "ToCells"
        },
        success: function(data, response) {
        },
        error: function(oError) {
        }
    });
    Add comment
    10|10000 characters needed characters exceeded

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

    give it a try.

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content