Help with a UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 10:25 AM
Hello,
Wondering if someone can help me fix this UI action, I've received a requirement to add a button at the top of the form which gets all problem tasks related to that record, however no joy as I cant seem to get it to pull the parent sys_id.
function showMyWindow() {
var tableName = 'problem_task';
var sysID = -1;
var Sysid = g_form.getUniqueValue();
var dialog = new GlideDialogWindow('Problem Tasks', tableName);
dialog.setSysID(sysID);
dialog.addParm('sysparm_view', 'default');
dialog.addParm('problem', current.sys_id);
dialog.setLoadCallback(function(iframeDoc) {
var dialogFrame = 'defaultView' in iframeDoc ? iframeDoc.defaultView : iframeDoc.parentWindow;
dialogFrame.g_form.getValue('parent', Sysid);
dialogFrame = null;
});
dialog.render();
}
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 10:32 AM - edited 07-23-2023 10:33 AM
Hi
why do you want to reinvent the wheel as you can already enable that list of problem tasks as a related list at the end of the form!
Instead of implementing everything someone require you should explain that you not only have to implement it in one experience but also maybe inthe Service Portal, in any Workspaces or in the Mobile App.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 01:08 PM
I have explained the benefit of the related list, however its to complement the existing related list functionality.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 07:41 PM
You can get working examples at http://servicenowguru.com/system-ui/glidedialogwindow_popup_record_list/ as your code makes absolutelyno sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 10:34 AM - edited 07-23-2023 10:35 AM
@Andrew_TND are you creating button on Problem record form to get problem tasks related to the same problem record ?
There is already a OOB related list "Problem Task" available on Problem record, you can use the same.
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!