- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 12:57 PM
Hi all,
I am pretty new to SN. Here is what I wanted to do:
I want to create a button "print" that will launch the printing of the record.
I have already created the UI action.
My question is the following:
Where do I add the "window.print()" command? is it inside the UI action script or inside the UI page.
A specific answer with an example would be greatly appreciated!
Please do not refer me to SN documentation on UI actions or Pages, I already covered that!
ps. I want to implement the solution as stated above, not with the export to pdf or other options.
Thanks for your help
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 01:13 PM
Hi,
you have to use the window.print() command in the UI Page, below an example:
<input name="btnGo" id="btnGo" type="button" value="Print" onclick="window.print()"></input>
Hope this will fit your need.
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thanks you
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 01:48 PM
Yes correct, try to add this for example in the client script of the UI Page, it might work:
function onCancel() {
var c = gel('cancelled');
c.value = "true";
GlideDialogWindow.get().destroy();
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2018 06:07 AM
Unfortunately, it's not working.
I'll look around if I can find other solutions.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2018 06:13 AM
I hope you will find a solution!
Cheers
Alberto