How to create a form in service portal to create a ticket in my custom table

vamshivemula
Kilo Contributor

Hi All,

I am having a custom table, how to create a form for that table in service portal to create tickets, and also any one explain me how to create a widget for that custom form in the service portal home page.

Process flow:

-> in service portal home page I need a widget for my custom form.

-> once I click it, it has to show me the form

-> after filling the form if I click submit it has to create a ticket in my table.

My aim is to give the that custom module from service portal.

Can any one please help me in this regard. Thanks in advance.

Thanks & Regards,

V Vamshi Krishna

8 REPLIES 8

michaelskae
ServiceNow Employee
ServiceNow Employee

Hi Vamshi,



Do you need to create a new widget at all?



The "form" page includes the "Form" widget which renders the fields on the standard form view on the Service Portal page.


A new record has sys id=-1, so as long as you supply the name of our table in the URL, the new record form will be displayed for this table.



For example, if your custom table is "u_test", use the URL:



https://<instance>.service-now.com/sp?id=form&sys_id=-1&table=u_test



Fill in the form, then click Save. The record will be created, and will reload the page with this new record.



Mike


I had a similar requirement and this resolution worked for me 🙂 Thanks Mike.

Hi,

 

I have a similar requirement. Did this work? Also where am i supposed to provide the URL in form widget.

 

Please suggest.

patricklatella
Mega Sage

Hi Vamshi,

I have a very similar requirement to build a custom form widget for providing a form in Service Portal...were you able to get yours built?  Would you mind sharing if so?  thanks!  Patrick