Opens a dialog and loads the specified view.
Parameters:
url
(String): URL of the content to be displayed,
typically a name of the view filerestriction
(JS object): (optional) restriction
to be applied to the dialog contentnewRecord
(boolean):
(optional) flag for the dialog view to display in the new record mode,
for form viewsparameters
(JS object): (optional) additional style options, including width
, height
, closeButton
(defaults to true
), maximize
(defaults to false
), and auto-wired functionsafterViewLoad
, afterInitialDataFetch
and callback
;
Example:
var restriction = {'rm.bl_id':bl_id, 'rm.fl_id':fl_id,
'rm.rm_id':rm_id };
var workRequestId = View.panels.get('exWorkRequest_wrForm').getFieldValue('wr.wr_id');
View.openDialog('ab-select-room.axvw', restriction, false, {
width: 300,
height: 400,
closeButton: false,
maximize: true,
afterViewLoad: function(dialogView) {
var selectRoomController = dialogView.controllers.get('selectRoomController');
selectRoomController.workRequestId = workRequestId;
},
callback: function(res) {
var clause = res.clauses[2];
var value = clause.value;
View.panels.get('exWorkRequest_wrForm').setFieldValue('wr.rm_id', value);
}
});