getCurrent

Definition:

NDLDS<datasource name>.<dataset name>.getCurrent()

 

Description:

Obtain the current record.

 

Parameters:

none

Note: This function does not use the default ndlParams object.

 

Returns:

An object containing the current record.

 

Code Sample:

//initialise the requestParams field

ndlParams.requestParams = "";

//name the table

ndlParams.tablename = "MyDataset";

//read the values from the elements into the current record

NDLRuntime.prepareDatasource("MyDatasource", "MyDataset");

//assign the current record to the ndlParams.data object

ndlParams.data = NDLDSMyDatasource.myDatasets.getCurrent();

//call updateDatasource - the response is asynchronous

NDLDSMyDatasource.updateDatasource(ndlParams);

 

Notes:

  • When calling getCurrent, you can find the names you need to use in your custom JavaScript to refer to a Datasource and its Dataset from the Datasource and Datasets's Code Name properties and for Dataset column names from the Code Name column under the Mappings tab when the dataset is open in the Form Design workspace.

  • An alternative method of accessing the current record is to use:

    NDLDS<datasource name>.<dataset name>.current

 

Using as Predefined Action in Event:

n/a

 

 


See also:

refreshFormControlsFromDatasource

updateDatasource

Reset Form

Writing Scripts