- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2016 04:36 PM
Hello,
Good day.
I would like to ask on how to load/display an existing form (ex. incident form) in a widget /page in servicePortal?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2016 04:53 AM
To add a form widget as a link on the service portal homepage:
Service Portal -> Pages -> find the page called Index, open the record and chose "Page in designer" in the related links section.
From the page designer, drag & drop an "Icon link" widget onto the page. Once dropped, press the pencil icon (top right corner) of the newly added "Icon link" widget. Set an apropriate title and set the Type field to URL and the HREF/URL field (pops up after you choose URL) to e.g.:
sp?id=form&table=incident&sys_id=-1
id is the name of the widget, table is the table you want to display the form from and -1 means new record
Or just open directly by URL:
yourinstance.service-now.com/sp?id=form&table=incident&sys_id=-1
If you want to edit the widget you have to clone it first and give it an appropriate name. The name you give it goes in the id= variable of the URL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2016 05:53 PM
Try the following;
HTML
<widget id="widget-form" options='data.formWidget'></widget>
Server Script
data.formWidget = { table: "incident", sys_id: "-1", hideRelatedLists: false };
Also see this GitHub URL for more on Service Portal:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2016 09:27 PM
Hello Sir,
Please advise to where do I put the html and server script?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2016 06:49 PM
Hi Joan,
There's already a form widget you can use oob as well as an existing page you can use. The form page is just called form and you can pass it a table name and sys_id. For example, if you wanted to show a specific incident you would use the following:
instance.service-now.com/sp?id=form&table=incident&sys_id=j4h2k5lj34h5lkj234h5klj23h45kljh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2016 09:22 PM
Hi sir,
Please advise what do you mean by using form widget?
I have tried putting a form widget in my page but there is no input for a table.
Please advise.
Thanks!
