The CreatorCon Call for Content is officially open! Get started here.

Add new record widget

chris_mccarthy
Kilo Contributor

Hi,

I'm new to developing in Service Now so I'm probably missing something here.

We are developing a portal application and need to add a widget to create a new record in a table that extends the Tasks table. We are looking at using the Forms widget but when we link to it we get Record not found as the item hasnt been created.

Thanks Chris

8 REPLIES 8

Chuck Tomasi
Tera Patron

Hi Chris,



If you want to create a new record, you need to use the sys_id -1. Often times this is done via the URL. For example:



https://instancename.service-now.com/table_name.do?sys_id=-1



For a Service Portal widget, such as the form widget, you can pass it either via URL parameter or part of the options. (see line 33)


find_real_file.png


Hi,


Tried url and options and still get the No Record found message. (Included the table name as well).



Chris


Hi Chris,



What does the URL look like when you try to create the new record? Does it have a sys_id specified anywhere?