Modal Widget in Portal

Mike_R
Kilo Patron
Kilo Patron

Hi, 

I need help creating a modal in the service portal. I want to launch the create incident record producer (or possibly other catalog items) in a modal window. Is this possible?

1 ACCEPTED SOLUTION

nathanfirth
Tera Guru

Yes, it can be done pretty simply. I wrote a blog post a while ago on opening modals in Service Portal: https://serviceportal.io/modal-windows-service-portal/

The only thing different would be embedding the record producer inside the template using the <sp-widget> directive and passing in the right options. For info on embedding widgets, see here: https://serviceportal.io/docs/documentation/widget_embedded.md

-----------------
Nathan Firth
Founder and ServiceNow Architect
NewRocket, Inc.
nathan.firth@newrocket.com
http://serviceportal.io
http://newrocket.com

View solution in original post

2 REPLIES 2

Matt Saxton - G
Kilo Guru

Hi Mike,

You can embed the Record Producer widget inside modal window. Here's someone saying they were successful doing something similar. 

https://community.servicenow.com/community?id=community_question&sys_id=b846cba1db1cdbc01dcaf3231f96...

 

Here's the doc's on embedding a widget..  You may new to clone the OOTB widget and make changes. 

https://docs.servicenow.com/bundle/madrid-servicenow-platform/page/build/service-portal/concept/c_Ne...

Finally here's the doc's on Modal. 

https://docs.servicenow.com/bundle/madrid-application-development/page/app-store/dev_portal/API_refe...

 

Hope this helps and let us know of your results. 

 

-Matt

nathanfirth
Tera Guru

Yes, it can be done pretty simply. I wrote a blog post a while ago on opening modals in Service Portal: https://serviceportal.io/modal-windows-service-portal/

The only thing different would be embedding the record producer inside the template using the <sp-widget> directive and passing in the right options. For info on embedding widgets, see here: https://serviceportal.io/docs/documentation/widget_embedded.md

-----------------
Nathan Firth
Founder and ServiceNow Architect
NewRocket, Inc.
nathan.firth@newrocket.com
http://serviceportal.io
http://newrocket.com