Last active
August 29, 2015 14:26
-
-
Save afaulkinberry/c4e4f27944f54c87e46e to your computer and use it in GitHub Desktop.
ServiceNow - GlideDialogs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Opens dialog window container - Table Form View | |
function newGDF(tableName, sysID, disVal){ | |
var dialog = new GlideDialogForm('View User', tableName); | |
dialog.setTitle(disVal); | |
dialog.setSysID(sysID); | |
dialog.addParm('sysparm_view', 'sys_popup'); | |
dialog.addParm('sysparm_form_only', 'true'); | |
dialog.render(); | |
} | |
newGDF('sys_user', '77433c8637ed0e40a457085a43990e39', 'Adam Faulkinberry user information'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Opens dialog window container - UI Page | |
function newGDW(pageName){ | |
var dialog = new GlideDialogWindow(pageName); | |
dialog.setTitle("Window Title Here"); | |
dialog.render(); | |
} | |
newGDW('sys_user'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Opens dialog window container - Table List View | |
function() { | |
var tableName = "incident_list"; | |
//Initialize the GlideDialogWindow | |
var dialog = new GlideDialogWindow('display_' + tableName); | |
dialog.setTitle('Incidents Assigned to Me'); | |
dialog.setPreference('table', tableName); | |
dialog.setPreference('sysparm_view', 'default'); | |
//Set the table to display | |
var query = 'active=true^assigned_to=javascript:gs.getUserID()'; | |
dialog.setPreference('sysparm_query', query); | |
//Open the dialog window | |
dialog.render(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment