Overview
This article is to support customers on NetSuite who either want their bill payment to have at least one of the three main classifications for reporting purposes (Location, Class, and Department) or do not want to turn off their requirements to have them populate on a bill payment.
NOTE: This script's native setup requires the classification fields to be NOT MANDATORY. If they are, follow the additional steps in the setup below.
How to Deploy This Script
Step 1
Add this script to your NetSuite by navigating to Customization -> Scripting -> Scripts -> New
- Upload the script file and create the record
-
Enter in these fields on the script record header:
- Type: User Event
- Name: RAMP - Set Bill Payment Fields
- ID: _ramp_set_payment_fields
- Description: User Event script used to populate header fields on Bill Payments
- Under the Parameters subtab, create these parameters and make sure the checkbox for "Store Value" is checked off.
Step 2
Click "Deploy Script" at the top of the script record to make it available in the system
-
Enter these values on the script deployment page:
- Applies to: Vendor Payment
- ID: _ramp_set_payment_fields
- Status: Released
- Log Level: Debug
- Execute as Role: Current Role
-
Under the Audience subtab, select "All Roles"
-
Under the Parameters subtab, enter the classifications your customer needs sourced in (location, class, and department) and check the box if they want the fields sourced from the header OR from the item sublist and the expense sublist, depending on where they want to code classifications on their Vendor Invoices.
- If they have renamed their classifications, their ID would stay the same as their native name in NetSuite—for example, the location may be renamed Warehouse, but the ID would still be location.
- Note: If sourcing from the item or expense sublist, it pulls from the first line item that is in the Vendor Invoice as it populates in NetSuite.
- Note: If you have the checkbox marked for header, items, and expenses, the script will look at the header classifications first and then the item and expense sublists afterward if no information is there.
- Ex. of pulling all classifications only from the "Header" level
- Under the Context Filtering, choose "RESTlet" under Execution Context only, as well as select All Localization Contexts.
- Click Save when complete
If Any Classifications are Required to Stay Mandatory
-
To keep them mandatory, they must be hidden on the form
- We can keep them as mandatory, while still be available for Ramp to code to in the back end for reporting, by having them hidden in the bill payment form.
- To hide the fields customize the vendor bill payment form
- Once in the customize form page, go under Screen Fields -> Main -> And uncheck "Show" for the classifications that this applies to
-
If they still require the classifications to show on the form, we need to create custom fields that pull the classification information from the native fields in NetSuite that have been hidden.
- Navigate to Customization -> Lists, Records & Fields -> Transaction Body Fields -> New
- Set the fields up by filling out the form for each classification they'll need displayed. The example below shows this for the Department (View) Field.
- Navigate to the Payment form and make sure the native segment is hidden and the (view) option is displaying.
- Test the script and review it with your customer.
Additional Support
In the instance you more help, reach out to our Support team and we will gladly assist you.