Form widget

The form widget is exactly what it sounds like: a widget that looks like a form in the platform UI.

The form widget works similarly to the platform UI, however there are a few differences.

Figure 1. Form widget
Form widget in the shape of the portal form

URL Parameters

The form widget accepts the following parameters within the URL
Table 1. Form widget URL parameters
Paramter Description
sys_id or sl_sys_id The sys_id for the record to be displayed
table, sl_table, or t The table for the record to be displayed
view or v The view used to display the record
In the following example. The URL would display an incident with a sys_id of 1c741bd70b2322007518478d83673af3 in the portal view.
https://example.service-now.com/sp?id=form&table=incident&sys_id=1c741bd70b2322007518478d83673af3&view=portal
Table 2. Form script support
Form script Description
Client scripts Must be marked with a UI type of Both or Mobile. Client Scripts marked as Desktop rely on legacy APIs that aren't supported by Service Portal.
UI Actions All server-side UI actions are supported in Service Portal, although setRedirectURL() operations are ignored. Service Portal forms handle redirection in a different way than the platform.

Any UI Actions marked as Client are ignored by the form widget.

UI Macros Not supported. UI macros use Jelly.
UI Policies Supported
Formatters Not supported. Formatters use Jelly.