refresh(restriction, newRecord)
JavaScript API Reference / AFM.view.Component object
refresh(restriction, newRecord)
Refresh the control content. Actual implementation varies from one control to another, and typically will request new data from the server.
Parameters:
-
restriction
(JS object): (optional) restriction to be applied to the control content -
newRecord
(boolean): (optional) flag for the control to display in the new record mode, applies only to form controls
Example:
Refresh the project report and apply the restriction based on department value selected in the console.
var form = View.getControl('',
'console');
var department = form.getFieldValue('dp.dp_id');
var restriction = {'project.dp_id': department};
var grid = View.getControl('', 'projects');
grid.refresh(restriction);