---
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, or opens a document for self-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_wide.png)

## Choose how the document is delivered

In **2. Delivery and Invite Settings**, select how the documents are delivered:

| Option | Description |
| --- | --- |
| **Send for signature** | The sender sends the documents to recipients for signing. |
| **Self Sign: sign the document without sending** | The sender signs the document themselves without sending an invite. |

The following table shows which delivery options are available for each combination of document sources.

| What is sent | Send for signature | Self Sign |
| --- | --- | --- |
| **NetSuite HTML template** | Yes | Yes |
| **File** | Yes | Yes |
| **NetSuite HTML template** and **File** | Yes | Yes |
| **SignNow template** (selected by the sender or pre-selected by the Admin) | Yes | No |
| **NetSuite HTML template** and **SignNow template** | Yes | No |
| **SignNow template** and **File** | Yes | No |
| **NetSuite HTML template**, **SignNow template**, and **File** | Yes | No |

Self Sign isn't available when **SignNow template** is selected. To select Self Sign, clear **SignNow template**. When Self Sign is selected, the **Add a SignNow Document Flow** step is hidden. For the sender's steps, see [Self Sign a document](#self-sign-a-document).

![Generate Custom Action form with NetSuite HTML template and File selected and Self Sign selected in Delivery and Invite Settings](/reference-assets/images/SignNow_Netsuite/netsuite_custom_action_self_sign.png)

## Add the SignNow document flow (optional)

In **3. 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 **4. Generate a script for your custom button** (**3.** for Self Sign actions), select the record type the button will appear on from the list and enter a button label. The script updates automatically.

If the document flow updates the record on completion and you select a different record type, an alert names the flow's record type, for example: *The document flow is set to Sales Order. Choose the same record type to update the record.* Select the same record type so that SignNow can update the record.

![Custom action with the document flow selected and Estimate as the record type, showing the record type mismatch alert](/reference-assets/images/SignNow_Netsuite/netsuite_custom_action_record_type_mismatch.png)

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_wide.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 type you chose in the custom action. The deploy instructions in the custom action name it for you, for example: *In the **Applies To** field, select **Sales Order**.*

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)

In the **Add recipients** dialog, enter each recipient's email and select **Signer** or **Approver** for the role. Click **Add CC Recipients** to send copies, then click **Save and Continue**.

![Add recipients dialog with roles, recipient emails, and the Signer and Approver actions](/reference-assets/images/SignNow_Netsuite/netsuite_send_add_recipients.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).

### Self Sign a document

When the action uses **Self Sign**, the sender signs the documents themselves without sending an invite:

- Click the custom button on the record.
- If the action includes files attached to the record, the **Select File** window opens. **PDF printed from this record** stays selected if the action includes the NetSuite HTML template. Select the attachments to sign, set their order in **Merge order** if needed, and click **Proceed**.

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

- The editor opens with the documents. Use the tools on the left panel, such as **My Signature**, to fill out the documents, then click **Done**.

![SignNow editor in a Self Sign custom action with a signature added and the Done button](/reference-assets/images/SignNow_Netsuite/netsuite_selfsign_editor.png)

If you click **Done** before adding your signature, the **Signature Missing** page opens. Click **Back to Editor** to return to the document and add your signature, or click **Download Document** to save the document as it is.

![Signature Missing page with Back to Editor and Download Document](/reference-assets/images/sharepoint_new/sharepoint_selfsign_signature_missing.png)

- On the **Document Complete Successfully** page, click **Download Document** to save a copy to your device.

![Document Complete Successfully page with the Download Document button](/reference-assets/images/SignNow_Netsuite/netsuite_selfsign_complete.png)

The signed document is saved to the record in **Communication > Files**, provided saving completed documents in NetSuite is enabled in [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*
