- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2016 07:22 AM
Hi All,
I have a UI Page(xyz) which invokes a UI Macro to show few buttons on header and carry out buttons functionality.
I have a UI Action created to incident page which shows as a link on the form.
When i click on the link (created by ui action) in the incident page , then i want it to perform what the UI page (xyz) does .[ That is loads a page with header and buttons].
Is it possible that when I click on the UI Action link, it performs what is being carried out by UI Page.
Please let me know if there is any other approach in which this can be achieved or if this is possible then share the script for same.
Thanks in advance
Surya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2016 10:30 AM
For example.. I have a ui page named testdriftinformation
here is the code below to get the ui action to load that page in the main window.
sendToNorChange();
function sendToNorChange()
{
//make the url to a new normal change
var url = 'testdriftinformation.do';
//Redirecting the user to the new url
action.setRedirectURL(url);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2016 08:04 AM
Using the setPreference('table.... doesn't open your ui page.. then it show you the list of records..
If you want to open a ui page. This is an example from wikin
function commentsDialog() {
//Get the values to pass into the dialog
var comments_text = g_form.getValue("comments");
var short_text = g_form.getValue("short_description");
//Initialize and open the dialog
var dialog = new GlideDialogWindow("add_comments_dialog"); //Instantiate the dialog containing the UI Page 'add_comments_dialog'
dialog.setTitle("Add Task Comments"); //Set the dialog title
dialog.setPreference("comments_text", comments_text); //Pass the comments into the dialog
dialog.setPreference("short_text", short_text); //Pass in a short description for use in the dialog
dialog.render(); //Open the dialog
}
Read more here.
Displaying a Custom Dialog - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2017 05:17 AM
Hi Goran,
How can I call a UI page that is invoked from UI script and display that UI page in UI action?
I had used your script of url but it is not working. It is showing an alert with no records found. I haven't used that alert in any of my scripts. Please help me troubleshooting.
Thanks,
Uzma