ANS-1518 · SALES ORDER PROCESSING

How to Manage Mandatory Department Fields on NetSuite Invoices with Custom Forms?

This guide addresses how to manage mandatory department fields on NetSuite invoices, ensuring custom forms and validations work for standard transactions and Invoice Billable Customers.

Short answer

To manage mandatory department fields on NetSuite invoices while using custom forms and supporting Invoice Billable Customers, disable the global "Make Departments Mandatory" setting. Implement save record triggered validations for standard transactions and a user event script on before submit to force custom forms based on customer preferences.

Scenario

A NetSuite environment requires custom invoice forms to be enforced based on customer preferences, functioning across both standard invoice screens and the Invoice Billable Customers process. Several client-side validations and alerts are in place. A key challenge arises because the Department field has been made mandatory, and existing sales orders are not updated accordingly. The mandatory Department validation triggers before the beforeSubmit event, preventing the custom form from overriding the mandatory Department setting, which impacts Invoice Billable Customers.

Solution

To resolve the conflict between mandatory department fields and custom invoice forms, implement the following steps:

  1. Deactivate the global mandatory setting for departments by navigating to Setup > Accounting > Accounting Preferences > Classifications and unchecking "Make Departments Mandatory".

  2. Introduce save record triggered validations to replicate the mandatory Department requirement for standard transactions. These validations will ensure that the Department field remains mandatory for regular invoice creation and editing.

  3. Ensure that the newly added save record validations are specifically configured NOT to trigger on transactions originating from the Invoice Billable Customers process. This allows the Invoice Billable Customers process to bypass the mandatory department validation.

  4. Develop a user event script that executes on the beforeSubmit event. This script should dynamically force the appropriate custom invoice form based on the customer's predefined preferences.

Expert NetSuite Support

Need help with this NetSuite issue?

Sales Order Processing consulting and configuration support

Talk to a consultant