Difference between GlideDialogForm, GlideDialogWindow, and GlideModalForm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2018 03:11 PM
Anyone? And which one of those are considered to be outdated?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2018 11:03 PM
Hi Tahnalos,
I tried giving few scenarios where we use the first 2 cases, hope this helps.
GlideDialogForm:
Scenario: When dealing with incidents, we may often find the CI doesn't exist, we need an easy way to create them without spoiling other areas. This can be done via a GlideDialogForm.
Use GlideDialogForm to pop up a dialog box and show the CI Server Form, which is a different form to be displayed on incident form. Example code:
function ciPopup() {
var dialog = new GlideDialogForm('Create Server CI',
'cmdb_ci_server'
, populateCmdbCIField);
dialog.setTitle('Create Server CI');
dialog.addParm('sysparm_view'
, 'default');
dialog.addParm('sysparm_form_only'
, 'true');
dialog.render();
}
function populateCmdbCIField(action, sys_id, table,
displayValue) {
g_form.setValue('cmdb_ci'
, sys_id);
GlideDialogWindow:
This is just a pop up window with few fields and not all as in the case of GlideDialogForm.
Scenario: Here you can use GlideDialogWindow to update a record from a list view with multiple fields at once anywhere in the system. This example is a popup that shows required closure information when a UI action button is clicked.
‘Resolve Dialog’ UI Action
Name: Resolve Dialog
Table: Incident
Client: True //This is client side code
Form Button: True
OnClick: showMyForm()
Condition: !current.isNewRecord()
function showMyForm(){
//Get the table name and sys_id of the record
var tableName = g_form.getTableName();
var sysID = g_form.getUniqueValue();
//Create and open the dialog form
var dialog = new GlideDialogForm('Update incident', tableName); //Provide dialog title and table name
dialog.setSysID(sysID); //Pass in sys_id to edit existing record, -1 to create new record
dialog.addParm('sysparm_view', 'ResolveDialog'); //Specify a form view
dialog.addParm('sysparm_form_only', 'true'); //Add or remove related lists
dialog.render(); //Open the dialog
}
I have less knowledge on GlideModelForm, cant help much in this case. Thank you.
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2018 08:37 AM
Can you use scenario 1 to display a record producer instead of the actual record form? I can't figure it out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2019 04:08 AM
With GlideDialogForm and GlideModalForm you can only render a normal form, i.e. a database record. To display a UI Page of your choosing in a popup window, use GlideDialogWindow or GlideModal instead.
The UI Page that is used for rendering of Catalog Items (and Record Producers, which are in fact a subclass of Catalog Items) is called "com.glideapp.servicecatalog_cat_item_view".
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2021 10:45 AM
Hi Lisa,
Did you ever get your record producer to display? I'm trying to do something similar
Matthew