OData Service Function Call

    /**
     * @description OData Service Function Call
     * @returns {promise} oData Service Call
     * @private
     */
    _functionCall: function() {
    	var oServiceModel = this.getOwnerComponent().getModel();

    	return new Promise(function(fnResolve, fnReject) {

    		var sPath = "/FunctionCallName";

    		var oParameters = {
    			method: "GET",
    			urlParameters: {
    				Parameter: "XYZ"
    			},
    			success: fnResolve,
    			error: fnReject
    		};

    		oServiceModel.callFunction(sPath, oParameters);
    	});
    }

Leave a Reply

Your email address will not be published. Required fields are marked *