How to load 2 fields on a form from a popup grid using a custom script.
Suppose,
FORM has FIELD1 & FIELD2
GRID has FIELDA & FIELDB
when we click on a Grid Row, the value from FIELDA of the GRID should be populated on FIELD1 of the FORM, and the value from FIELDB of the GRID should be populated on FIELD2 of the FORM.
I want to do this using Custom Script.
I am using the below script which I know is wrong.
===============================
var form = getWidget('FORM');
var varA = rec.get('FIELDA');
var varB = rec.get('FIELDB');
form.FIELD1.setValues(varA);
form.FIELD2.setValues(varB);
===============================
Suppose,
FORM has FIELD1 & FIELD2
GRID has FIELDA & FIELDB
when we click on a Grid Row, the value from FIELDA of the GRID should be populated on FIELD1 of the FORM, and the value from FIELDB of the GRID should be populated on FIELD2 of the FORM.
I want to do this using Custom Script.
I am using the below script which I know is wrong.
===============================
var form = getWidget('FORM');
var varA = rec.get('FIELDA');
var varB = rec.get('FIELDB');
form.FIELD1.setValues(varA);
form.FIELD2.setValues(varB);
===============================
Comment