ANS-0281 · ACCOUNTING & FINANCIAL CONFIGURATION
How to Link Customer Payments to Invoices with a Custom Field in NetSuite
Automate customer field population on NetSuite payment records by linking to a specific invoice.
Short answer
To link customer payments to invoices and auto-populate customer details, create a custom transaction body field (List/Record - Transaction) applied to Customer Payments, filtered for open invoices. A SuiteScript then sets the Customer field based on the selected invoice, automatically updating the associated invoice list.
Scenario
Users need to efficiently process customer payments and ensure they are correctly linked to specific invoices. Manually selecting the customer and then the invoice can be time-consuming and prone to error. The goal is to streamline this process by allowing users to select an invoice first, which then automatically populates the corresponding customer information on the payment record.
Solution
The solution involves configuring a custom transaction body field and implementing a SuiteScript to automate the population of the customer field on payment records.
Create a Custom Transaction Body Field
- Navigate to Customization > Lists, Records, & Fields > Transaction Body Fields > New.
- Set the Type to List/Record.
- Set the List/Record to Transaction.
- Apply this field to Customer Payment records.
Configure Field Filtering
- On the custom field definition, set the Filter to include:
- Status Invoice:Open
- Type:Invoice
- This ensures that only open invoices are available for selection in the custom field.
Implement a SuiteScript
- Develop a SuiteScript (e.g., a User Event script or Client script) that triggers when an invoice is selected in the custom field.
- The script should programmatically set the Customer field on the payment record based on the customer associated with the selected invoice.
- *Note on SuiteScript Limitations*: While field manipulation on customer payment records is generally supported, direct creation of customer payment records via SuiteScript's record.create() method may have limitations according to NetSuite documentation. The scripting approach described here focuses on populating fields on an existing or manually created payment record.
Automatic Invoice List Update
- Once the Customer field is populated by the script, NetSuite will automatically update the Apply subtab to display the relevant invoices for that customer, allowing for easy application of the payment.
Expert NetSuite Support
Need help with this NetSuite issue?
Accounting & Financial Configuration consulting and configuration support
