Skip to main content

Scripting widget

Add a Scripting Widget to a dashboard to run custom JavaScript in a secure sandbox with a code editor, help panel and live preview.

Written by Peter Novosel

A Scripting widget runs code you write, inside a dashboard. Think of a small tool built into the page: a code editor and the API reference on the left, the output on the right, and a Test button between them. The code runs in a sandboxed frame and reaches SmartSuite through the SDK.

Here is the test: do you need a calculation or a small tool the other widgets cannot give you? If yes, add a Scripting widget. To embed a page or a snippet from another tool, use the Custom Code or Webpage widget.

Example: on the Vendor risk overview a script totals open findings by vendor and writes the top three into the output. The Security lead runs it with Test. Finance sees the output in View mode.

The Scripting window in Edit mode: the code editor and the API Reference on the left, the Test Output on the right, the Test button above it.

The Scripting window in Edit mode: the code editor and the API Reference on the left, the Test Output on the right, the Test button above it.

Plan Availability

Professional and Enterprise. Signature provides the same capabilities as Enterprise, but this is where our GRC and IT Service Delivery products can be licensed. These products can not be licensed for Team, Pro or Enterprise plans.

Permissions

Solution Managers and Administrators create, change and delete Scripting widgets.

Platform

Web

Related Reading


My script shows an error or nothing runs

Solution Managers and Administrators create and change Scripting widgets. If you cannot edit the dashboard, send this page and the dashboard name to the person who manages the solution.

  1. Errors show only after Test. Nothing shows while you type. A script that throws marks its line "Error" in the editor, and the Test Output stays blank.

  2. The sandbox. The output runs in a sandboxed frame. Browser-local resources and privileged browser APIs are not available. To embed a page or an HTML snippet instead, use the Custom Code widget. See Custom code widget.

  3. The API call. SmartSuite is reached through window.SmartSuite. The reference sits under the editor, in the API Reference panel.

  4. The plan. The widget is on Professional and higher.

Still stuck: select the chat button in the lower right of SmartSuite and send a message with the dashboard name, the widget name and the error shown after Test.


Adding a Scripting widget

  1. Set the View | Edit switch in the upper right to Edit.

  2. Select + Add Widget in the toolbar. The Add New Widget sidebar opens on the right with a Search Widget box and thirteen collapsible categories. Page Display is open to start.

  3. Open Utilities and select the Scripting card. Its info icon reads "Write and run custom code to transform data or create custom functionality".

  4. A full-width code window opens, not the settings modal the other widgets use. Write the code, select Test, then select Done at the foot to place the widget.

The widget lands on the dashboard. Drag it by its handle to move it.


The code window

The window has a header, the code editor and the API Reference on the left, the Test Output on the right, and Cancel and Done at the foot.

The header

An editable title box, "Scripting" to start, with three icons at the right: More Options, Help and close. More Options holds Exit Fullscreen, Highlight Color, Rename, Add Description, Duplicate Widget and Collapsed by Default.

The code editor

The left column, with line numbers. Write HTML and script tags here; the Quick Reference shows the SDK calls inside script tags.

The API Reference

A collapsible panel under the editor that embeds the developer documentation. Its navigation reads Overview, Quick Reference, Configuration Settings, Scripting Reference and Scripting Examples. The Quick Reference lists the calls on window.SmartSuite: get_current_member, get_table, get_record, update_records, create_records, get_solution, list_views, list_teams and list_members.

Tip: Collapse the API Reference once the script works. The editor gets the height back.

The Test Output

The right column, with a Test button. Select Test and the output renders in a sandboxed frame. The read rendered an HTML heading there. A script that throws marks the line in the editor and leaves the output blank.

Note: Nothing runs until Test. A mistake in the code shows no warning while you type it.

The API Reference panel open on the Quick Reference under the editor.

The API Reference panel open on the Quick Reference under the editor.

Cancel and Done

Done places the widget. Cancel after a change asks "Are you sure you want to exit without saving the changes you made?", with Exit Without Saving and Save Changes.


Permissions

Solution Managers and Administrators create, change and delete Scripting widgets in the solutions they manage. Every member who can open the dashboard sees the output. See Dashboard Settings.


Using the widget

In View mode the widget's body shows the output as Test rendered it. The code reaches SmartSuite through the SDK at window.SmartSuite, with the session's own sign-in, so no token goes into the script. Calls to outside services with fetch work within the policies the sandbox enforces. The full reference is in the API Reference panel and in the Scripting collection.

The widget is web only.

The widget in View mode with the top three vendors by open findings in its body.

The widget in View mode with the top three vendors by open findings in its body.


Editing a Scripting widget

In Edit mode, hover over the widget and select Edit in the strip that appears above it. The code window reopens. The widget's three-dot menu reads Rename, Add Description, Minimize, Highlight Color, Duplicate Widget, Delete Widget and Collapsed by Default. Rename and Add Description take the place of the Title and Description the other widgets carry in their modal. See Manage widgets on a dashboard.


Frequently asked questions

Which plans include the Scripting widget?

Professional and higher.

Why do I not see errors while I type?

Errors show only after Test. The editor marks the failing line "Error" and the output stays blank.

Can my script call outside services?

Yes, with fetch, within the policies the sandbox enforces. Sign-in to SmartSuite comes from your session, so no token goes into the script.

Can the script read and write records?

Yes, through window.SmartSuite: get_record, update_records and create_records among the calls the Quick Reference lists.

Can the script run on a schedule?

No. The widget renders its output on the dashboard. For a script that runs on a trigger, use the Run a Script action in an automation.

What happened to the Custom Code widget?

It is still offered under Utilities, for an HTML snippet or an address. The Scripting widget is for code that uses the SDK. See Custom code widget.

Last verified 30 Oct 2026.

Did this answer your question?