- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2023 10:29 AM
I'd like to have a dialog with full form functionality (reference fields, dependant fields, everything).
GlideModalForm, I figured, is the only way to go.
but I would like to display the dialog in a different view, a stripped down version, of the actual form.
Is this possible? On the dialog I did not find anything.
What I could imagine though: is finding the current form on the list, setting my desired form, do my stuff, set the form on the list back to what it was before
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2023 11:25 PM
You can use the addParm method to set the view using the sysparm_view parameter
var gp = new GlideModalForm("TITLE", "TABLE", callbackFunction);
gp.addParm('sysparm_view', "VIEWNAME");
gp.render();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2023 11:25 PM
You can use the addParm method to set the view using the sysparm_view parameter
var gp = new GlideModalForm("TITLE", "TABLE", callbackFunction);
gp.addParm('sysparm_view', "VIEWNAME");
gp.render();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 04:00 AM
great tip.... trying to get it work.. but somehow it doesn't... I can use addParm to set the sys_id, such that it loads content from an existing record. If I try to change a field using addParm (eg. short_description) it does not update that field. It neither adds the "parm" to the url to use my required form...
but interesting approach anyway, thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 04:58 AM
Seems odd, it is what is done in at least 2 OOTB scripts I can find...
/sys_script_client.do?sysparm_query=`name=Dialog%20functions
/sys_ui_macro.do?sysparm_query=name=kb_my_suggested_edits
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 08:23 AM
your solution and this line do the trick:
d.addParm("sysparm_view_forced", true); does the trick... so you helped me really getting on the right path!
here's my blog about it https://inmood.ch/update-selected-records/