- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2019 09:13 AM
Hello Guys,
I have a UI Action on the change form and I need to display a dialog window with a specific View from a custom table called timeline. I am using GlideModalForm in order to achieve that but the problem is that I need to set the Parent field from timeline to the number from the parent change form. I tried to use the gModalForm.addParm('parent', sysId); but this is not working and the parent stay empty.
Here is the code:
function timelineDialog(){
var sysId;
if (typeof rowSysId == 'undefined')
sysId = gel('sys_uniqueValue').value;
else
sysId = rowSysId;
var gModalForm = new GlideModalForm('Timelines record', 'table_name);
gModalForm.setPreference('sysparm_view', 'view_name');
gModalForm.addParm('parent', sysId);
gModalForm.setCompletionCallback(function(action_verb, sys_id, table, displayValue){
if (action_verb == 'sysverb_update'){
reloadWindow(window);
}
});
gModalForm.render();
}
Any help will be appropriated, thank you in advance
Solved! Go to Solution.