- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2016 06:45 AM
Hello Guys,
I got a requirement to add a cancel button to cancel the actual order and redirec to home page... However I thought they were using CMS, I've noticed that there is a Plug in called "Service Portal" and it builds a complete site... this is completely new for me I've started to play with this but is completely different I've tried this (https://serviceportal.io/create-custom-action-buttons-service-portal/) but there is no instructions on how to add it to a specific page or form. Need Help ASAP, I couldn't find a documentation or clear examples of this.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2016 08:22 AM
Go here;
Then go here;
Click the "Edit Ticket Form (ticket) page in Designer
Then Drag&Drop your new widget into the page where you want it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2016 12:51 PM
AWESOME!!!!
Thank you so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2018 02:36 AM
Hi,
Incident Widget is working for me in Kingston. But for requested Item i get the following error message in log:
org.mozilla.javascript.EvaluatorException: GlideRecord.get() - invalid table name: null (<refname>; line 32)
Line(32)
return table;
evaluateString(JavaScript evaluation error on:
(function(){(function() {
data.sys_id = input.sys_id || options.record_id || $sp.getParameter("sys_id");
data.table = input.table || options.record_table || $sp.getParameter("table");
data.table = _getActualTable(data.table, data.sys_id);
data.maxAttachmentSize = parseInt(gs.getProperty("com.glide.attachment.max_size", 1024));
if (isNaN(data.maxAttachmentSize))
data.maxAttachmentSize = 24;
data.largeAttachmentMsg = gs.getMessage("Attached files must be smaller than {0} - please try again", "" + data.maxAttachmentSize + "MB");
data.attachmentSuccessMsg = gs.getMessage("Attachment successfully uploaded");
if (!data.table || !data.sys_id)
return;
var gr = new GlideRecord(data.table);
if (!gr.isValid())
return;
if (!gr.get(data.sys_id))
return;
if (input && input.action == "deleted") {
gr.comments = input.action + " an attachment";
gr.update();
}
data.canWrite = gr.canWrite();
data.canAttach = gs.hasRole(gs.getProperty("glide.attachment.role")) && GlideTableDescriptor.get(data.table).getED().getAttribute("no_attachment") != "true";
data.canRead = gr.canRead();
function _getActualTable(table, id) {
var rec = new GlideRecord(table);
if (rec.get(id) && rec.getValue('sys_class_name')) {
return rec.getValue('sys_class_name');
}
return table;
}
})();
})()
)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2017 12:51 AM
hi all,
Attached is a document with screen shots from action buttons I added to the Incident and Request/Requested Items widgets. The other file is an update set.
These were consolidated and reworked with code and information I found in this post and some others.
kind regards, Bruno
Principal Platform Architect, Customer Success, ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2018 09:55 PM
These widgets aren't working in Kingston. I added the widgets to the Request form via Designer, but still nada. Is there something that needs to be changed in your script to work properly??
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2018 12:31 AM
hi Brandon,
What exactly is not working ? Do you receive an error message ? The request status page in London has been changed. That's why you probably do not see these buttons anymore. We'll have to amend that page again.
Bruno
Principal Platform Architect, Customer Success, ServiceNow