Open a Incident Form inside a Popup on service Portal Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2018 10:15 PM
I have Kingston instance of ServiceNow, On Service Portal, we have a page which contain widget that provides incident form for incident creation. I want to show that page/form inside a popup which is triggered on UI Event.
I might need to pass some prepopulated fields for that form
What is the best way to achieve this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2018 10:37 PM
Hi Nilesh,
You can use spModal.open to open form widget and provide the widget parameters there.
https://docs.servicenow.com/bundle/istanbul-application-development/page/app-store/dev_portal/API_reference/SPModal/concept/SPModal-API.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2018 12:03 AM
Thanks Rahul
Is there any way to show a whole page instead of a widget in spModal??

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2018 12:09 AM
Hi,
The widget itself renders whole page unless you are not talking about header and footer of the portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2021 06:05 AM
Hi ,
You can use spModel open method functionality by calling form widget present OOB
spModal.open({
title: 'Incident',
widget: 'widget-form' ,
size:'lg',
widgetInput : {table:'incident', sys_id:sysID} //pass the sys_id of a incident need to display
}).then(function () {
})
Note: Please insure you have inserted spModel in the controller function as a dependency injection.
this code you can specify in the ng-click function. After click form will be open as a popup.
Please Mark it as helpful if it helps you