A NetSuite user asks in the NetSuite Users Facebook Group how to add a button to a Sales Order that would launch a native NetSuite record.
In this short tutorial, I would show the step-by-step instructions on how to do so.
A. CREATE THE ‘CONNECTING’ FIELD
In this section, we are creating a “connecting” field for the workflow to identify which record it would navigate to. We are making it simple by creating a Transaction Body Field that sources its list from existing Sales Orders.
- Log in to NetSuite.
- As an administrator, go to Customization > Lists, Records & Fields > Transaction Body Fields > New.
- Enter the following settings:
a. Label = Enter any
b. Under Applies To > Tick on “Sales” (Reason is that we are applying it on Sales Transactions, such as Sales Order)
c. Type = List/Record (Since we are going to source the values from Transactions)
List/Record = Transaction (In our example, we are going to source the value from Sales Transaction)
Store Value = Yes
B. CREATE THE WORKFLOW
- Go to Customization > Workflow > Workflows > New.
- Set the following:
A. Name = Make the name easy to understand, e.g. “Go to a Sales Order”
B. Record Type = Transaction, Sub Types = Sales Order
C. On View or Update = Yes
Trigger Type = Before Record Load
Event Type = View (This means that the workflow will only run on “View” mode)
D. Contexts = User Interface (Since we only aim to run this in the User Interface)
E. Release Status = Testing (This means that the workflow when only run when you are the one testing it)
F. Condition = Add any condition for the workflow to run
- Save the workflow.
- Click on “New Action” at the bottom part of the page.
- Select “Add Button”.
- Label your button and save.
- Click on “New State”. The workflow must have two states as shown in the screenshot.
- Drag the arrow to connect State 1 with State 2 as shown in the GIF below.
- Click on the Arrow.
- Edit the transition by clicking on the pencil icon.
- On the “Execute on Button” field, select the button that you created in Step 6.
- Save the transition.
- Click on State 2.
- Click on “New Action”.
- Select “Go to Record”.
- Enter the following parameters:
Trigger On = Entry
Record Type = Sales Order
Field = Record To Go To (This is the field that you created in Section A. Create the Connecting Field.
- Save the action.
C. TEST THE WORKFLOW
It’s time to test the workflow. Since we selected the workflow to only run on View mode, you should go to an existing Sales Order in that view. See the GIF below as a demo on how to test it.
In the demo, you will notice that from Sales Order # 12129, the page redirects to Sales Order # 10, which is what’s set on “Record To Go To” field.
LEACC Consulting is a team of NetSuite Certified Developers with IT experience solely dedicated to NetSuite technologies for eight years. We are experts in NetSuite integrations. See list of NetSuite projects that we completed in this page.
Do you have NetSuite SuiteFlow needs? Do you need help with a solution like this? Click on the link below and let’s have a chat about your project requirements!