mor.Ajax.setResultFields() MScript Function

Top  Previous 

In the runtime, anywhere where MScript functions can be used (e.g. Data sources, processes, etc.) , mor.Ajax.setResultFields() MScript function can also be used.

The symbols created with this function are placed into the AjaxResponse and in the browser they can be accessed using response.getResultField(fieldName) function.

Example:

On the server with MScript

selecT NO as v:MUSTERI_NO from Musteriler WHERE NAME = '@vof(NAME)';

@mor.Ajax.setResultField(CUSTOMER_ID,v:CUSTOMER_ID)

 

On the browser after the response is received with Javascript

  function CallMeAfter(mpar) {

    alert( "Customer Id : " + mpar.getResponse().getResultField("CUSTOMER_ID") );

  }