---
title: "Custom actions"
url: "https://docs.signnow.com/docs/netsuite-custom-actions"
type: "page"
section: "Integrations"
slug: "netsuite-custom-actions"
---

# Custom actions

# Custom actions

Add a button to NetSuite records that sends a PDF generated from the record, its attachments, SignNow templates, or any combination for signing.

The **Custom Actions** tab in SignNow Admin Tools generates a script for each button. Add the script to NetSuite and deploy it to the records where senders need the button. Follow the steps below to configure the action, generate the script, and deploy it.

## Select what should be sent for signature

In **1. Select what should be sent for signature**, select one or more document sources. When you select several, the documents are combined into one document group.

| Document source | Description |
| --- | --- |
| NetSuite HTML template: a PDF generated from a NetSuite record | A PDF printed from the record the button is clicked on. To print it with a specific template, enter the template ID in **Advanced PDF/HTML Template ID**, as described below. To add signature and other fields to the template, see [Send HTML templates with text tags](/docs/netsuite-text-tags). |
| SignNow template | Select **SignNow template: selected by the sender** to let the sender choose templates when they click the button, or **SignNow template: pre-selected by the Admin** to always send the same templates. For pre-selected templates, choose one or more templates in **Select Template**. |
| File: from the list of files attached to a NetSuite record | The sender selects files attached to the record. Supported file types: PDF, DOCX, PNG, JPG, JPEG, GIF, BMP, DOC, ODT, RTF, and XML. Maximum file size: 10 MB. |

To find the ID of an Advanced PDF/HTML template:

1. In NetSuite, go to **Customization > Forms > Advanced PDF/HTML Templates**.
2. Find the template and copy the value in its **Script ID** column, for example `STDTMPLSALESORD`. The Script ID is the template ID that the custom action uses.
3. Paste the value into **Advanced PDF/HTML Template ID**.

![custom_pdf_list.png](/reference-assets/images/SignNow_Netsuite/text_tags/custom_pdf_list.png)

To set up an Advanced PDF/HTML template for SignNow, see [Customize the PDF/HTML template](/docs/netsuite-text-tags#customize-the-pdfhtml-template).

Leave **Advanced PDF/HTML Template ID** blank to print the record with its default template.

The following example combines a PDF generated from the record, a SignNow template pre-selected by the admin, and files attached to the record.

![Generate Custom Action form with NetSuite HTML template, SignNow template pre-selected by the Admin, and File selected](/reference-assets/images/SignNow_Netsuite/netsuite_custom_action_combined_sources.png)

## Add the SignNow document flow (optional)

In **2. Add a SignNow Document Flow**, select a document flow to send the documents with pre-configured invite settings, recipients, and email content. If no document flow is selected, the sender configures the document and the invite before sending.

A document flow can also hide steps from the sender, for example **Hide "Add Fields" step** or **Hide "Map Fields" step**. See [Document flows](/docs/netsuite-document-flows).

> [!WARNING]
> The recipient roles in the document flow must match the roles in the templates of the action. If the document flow hides the **Add Recipients** step and the roles don't match, the sender gets an error and the documents aren't sent.

## Generate a script for a custom button

In **3. Generate a script for your custom button**, enter a button label. The script updates automatically. Click **Download Code** to save the script as a `.js` file, or click **Copy Code** and save it to a `.js` file yourself, for example `send_sales_order_button.js`.

![Button label field and the generated script with Download Code and Copy Code buttons](/reference-assets/images/SignNow_Netsuite/netsuite_custom_action_script.png)

## Add custom action in NetSuite

### Create a script record

Go to **Customization > Scripting > Scripts > New**.

![custom_actions_new_script.png](/reference-assets/images/SignNow_Netsuite/custom_actions_new_script.png)

On the **Upload Script File** page, click the plus icon next to the **Script File** input field.

![custom_actions_plus.png](/reference-assets/images/SignNow_Netsuite/custom_actions_plus.png)

In the new window, go to **Select File,** pick the JS script you saved earlier, and click **Save**. 

Then click the **Create Script Record** button.

![custom_actions_script_record.png](/reference-assets/images/SignNow_Netsuite/custom_actions_script_record.png)

On the new **Script** page, name the script record based on the button's name for easy reference. Click **Save**.

![custom_actions_save_script.png](/reference-assets/images/SignNow_Netsuite/custom_actions_save_script.png)

### **Deploy the script**

On the **Script** page, click the **Deploy Script** button.

![deploy_script_start.png](/reference-assets/images/SignNow_Netsuite/deploy_script_start.png)

In the **Applies To** field, select the record where the button should appear.

Set the **Status** to **Released**.

In the **Audience** section, select who can access this button.

Click **Save** to apply your changes and deploy the button.

![deploy_script_save.png](/reference-assets/images/SignNow_Netsuite/deploy_script_save.png)

Go to the record you have selected to ensure that the button has been added.

## Send documents with a custom action

Senders click the custom button on a NetSuite record. What opens next depends on the document sources in the action:

- A PDF generated from the record is added to the document group automatically.
- If the action includes SignNow templates selected by the sender, the **Select Templates** window opens. If the action also includes files, it opens after the **Select File** window.
- A single template pre-selected by the admin is added automatically. If the admin pre-selected two or more templates, the **Select Templates** window lists only those templates.
- If the action includes files attached to the record, the **Select File** window opens.

### Select files

The **Select File** window lists the files attached to the record under **Record attachments**. If the action includes the NetSuite HTML template, **PDF printed from this record** is listed under **From this record** and stays selected.

Select the attachments to send and click **Proceed**. Alternatively, click **Back to Record** to cancel.

![Select File window with PDF printed from this record selected under From this record and a record attachment listed](/reference-assets/images/SignNow_Netsuite/netsuite_select_file_pdf_from_record.png)

### Select templates

In the **Select Templates** window, select one or more templates. Use **All Types**, **Show All Templates**, and the sort options to find a template.

Templates need fillable fields to be sent for signature. If a template you need is unavailable, ask your admin to add the fields.

The **Merge order** panel lists every document in the group: the PDF printed from the record, the files you selected, and the templates. Drag documents to set their order, or click **✕** to remove one. The PDF printed from the record can be moved but stays in the group. A template pre-selected by the admin is locked in place. Click **Back** to change the selected files.

![Select Templates window with a template selected and the Merge order panel listing the PDF printed from the record, a record attachment, and the template](/reference-assets/images/SignNow_Netsuite/netsuite_select_templates_merge_order.png)

Click **Proceed** to create the document group. The sending flow continues as configured in the action and its document flow.

### Prepare and send the documents

The editor opens with the document group if the action has no document flow, or if its document flow shows the **Add Fields** step. The PDF printed from the record and the record attachments arrive without fillable fields. Select a recipient and place the fields they need.

![SignNow editor with the PDF printed from the sales order and a record attachment in the document group, both without fields](/reference-assets/images/SignNow_Netsuite/netsuite_editor_document_group.png)

Then review the recipients and the invite email, and send the invite. Once all recipients sign, the completed document is saved to the NetSuite record. See [Document storage](/docs/netsuite-document-storage).

## Hide default SignNow custom actions

When you install SignNow for NetSuite, four custom buttons are added to NetSuite records automatically: **SignNow Invite Status**, **Send Attachment**, **Send for Signature**, and **Send SignNow Template**. To hide these buttons, turn off the deployments of their scripts.

Go to **Customization > Scripting > Script Deployments**.

![NetSuite Customization menu with Scripting > Script Deployments selected](/reference-assets/images/SignNow_Netsuite/hide_buttons_script_deployments_menu.png)

Expand **Filters** and type `SignNow` in the **Script** field. The four button scripts are:

- **SignNow Button - Invites Status**
- **SignNow Button - Send Attachment**
- **SignNow Button - Send for Signature**
- **SignNow Button - Send SignNow template**

Select a script and click **Edit** next to its deployment.

![Script Deployments list filtered by SignNow, with the SignNow Button scripts in the Script dropdown and Edit highlighted](/reference-assets/images/SignNow_Netsuite/hide_buttons_filter_by_script.png)

On the **Script Deployment** page, clear the **Deployed** checkbox and click **Save**.

![Script Deployment page for a SignNow button script with the Deployed checkbox highlighted](/reference-assets/images/SignNow_Netsuite/hide_buttons_uncheck_deployed.png)

Repeat these steps for each deployment of the four scripts. A script can have several deployments, one for each record type set in **Applies To**. To hide a button on specific records only, clear **Deployed** on the deployments for those records.

To show a button again, select **Show Undeployed** in the **Script Deployments** list, open the deployment, and select **Deployed**.


---
*Full page: https://docs.signnow.com/docs/netsuite-custom-actions*
