- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 07:35 AM
I have a requirement on incident to open pop up form
on that pop up form it should have few fields from another table.
which will submit record with some details from incident and popup on the other table form.
can we do it with Business rule not from ui action.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 09:05 AM - edited 10-18-2022 09:06 AM
Are you saying you want the actual field to display and not just the value? If so I would recommend doing a GlideDialogForm with a custom view that only shows the fields you want it to show. Here is an example of one I did:
var tableName = 'TABLE NAME HERE';
var sysID = g_form.getUniqueValue(); // sys_id of the record you want to show
var dialog = new GlideDialogForm('TEXT HERE', tableName);
dialog.setSysID(sysID); //Pass in sys_id to edit existing record,
dialog.addParm('sysparm_view', 'VIEW NAME HERE'); //Specify a form view
dialog.setDialogHeight(600);
dialog.render();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 08:08 AM - edited 10-18-2022 08:09 AM
You could use a modal in the platform view or Service Portal view.
Here is the code you'd need to write for the platform view. This would be done in a client script.
var gm = new GlideModal();
gm.setTitle('Whatever you want');
gm.renderWithContent('Put fields here');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 08:48 AM
Thanks for the reply Mark !
I used below code it is opening pop up but the whole form i want to open it with few fields.
function onSubmit() {
if(g_scratchpad.action ){
return true;
}
var gModalForm = new GlideModalForm('Create xyz', 'xyztablename');
gModalForm.setPreference('description', g_form.getValue('description'));
gModalForm.render();
return false;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 09:05 AM - edited 10-18-2022 09:06 AM
Are you saying you want the actual field to display and not just the value? If so I would recommend doing a GlideDialogForm with a custom view that only shows the fields you want it to show. Here is an example of one I did:
var tableName = 'TABLE NAME HERE';
var sysID = g_form.getUniqueValue(); // sys_id of the record you want to show
var dialog = new GlideDialogForm('TEXT HERE', tableName);
dialog.setSysID(sysID); //Pass in sys_id to edit existing record,
dialog.addParm('sysparm_view', 'VIEW NAME HERE'); //Specify a form view
dialog.setDialogHeight(600);
dialog.render();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 09:30 AM
added the code but opening like this