pp108 : getMethodRequest()

getMethodRequest()


It returns the request set to the model. If the model has navigational methods, that is the Next and Previous methods, then those methods can be retrieved by passing the type of method as parameter.

Syntax

Script

oRequest = modelId.getMethodRequest(sMethodType)


Parameters

Parameter

Description

sMethodType

String that denotes the type of the method for which the request is set. It can be get, next, or previous. The default value is get. The parameters are not case sensitive. The next and previous method types are not available for non-transactional models.


Return Value

oRequest

Object that denotes the request set for the method in the model.


Remarks


The getRequest , nextRequest ,and previousRequest properties have been deprecated.

Use the getMethodRequest method to retrieve the requests set for the various methods in the model.

The methods for the model can be set using the setMethodRequest() method.

Example

This sample code demonstrates how the property can be used.

//Set and fire request
var employeesRequest = employeesModel.getMethodRequest("Get");
cordys.setTextContent(cordys.selectXMLNode(employeesRequest,".//*[local-name()='EmployeeID']"),3);
employeesModel.setMethodRequest(employeesRequest, "get");
employeesModel.getDataset();

Applies to


Model

Related reference

Get Method Name
setMethodRequest()
Next Method Name
Previous Method Name
getFirstDataset()
getNextDataset()
getPreviousDataset()