How to Restrict Fields on a Custom Record via a Workflow

On a custom record, let's say you wanted the ability to restrict the use of multiple fields based on other fields being filled in. This is to prevent entering conflicting information that would cause issues with things like scripts or your pricing procedures.

To prevent entry in the specific fields, we can create a workflow that sets the field display type and can revert the record to normal if a field is emptied during record creation!

Conditional Field Display Restriction in NetSuite

In our example scenario, when an Item is selected, we want to disable the Item Pricing Group. The same rules apply to the customer fields on the custom record.

  • When Customer is selected, we want to disable Customer Chain and Customer Category.
  • When Customer Chain is selected, we want to disable Customer and Customer Category.
  • When selecting the Customer Category, we want to disable the Customer and Customer Chain.

We also want the ability to reactivate the disabled fields if the user empties one of the triggering fields.

How to Create Conditional Field Display Rules in NetSuite

To accomplish this, create a workflow for the custom record type that runs on create view or update.

This will be a single-state workflow with multiple actions and conditions.

The actions will all be Set Field Display Type with conditions applied. You will use Trigger On “After Field Edit” for all actions.

Here, I will only use the example of restricting the Item Pricing Group field when an Item is filled and how to reactivate that field.

Creating a NetSuite Workflow for Field Display Rules

In the first action of Set Field Display Type, select trigger on “After Field Edit” and select Item or the field you would like to trigger on. Then select the field you would like to restrict in the parameters section and set the display type to “Disabled.”

In the second Set Field Display Type action, select trigger on “After Field Edit” with the same triggering field as step 1. Then, add a condition stating, “Triggering Field Is Empty.” Then select the field you restricted in step one and set the display type to “Normal.”

You must enter the condition correctly; otherwise, the field will not be reactivated when emptying the triggering field.

When an Item is selected in the custom record, the Item Pricing Group is disabled. Then, if the item field is cleared, the Item Pricing Group is reactivated.

Author: Kevin Ronczkowski


Got stuck on a step in this article?

We like to update our blogs and articles to make sure they help resolve any troubleshooting difficulties you are having. Sometimes, there is a related feature to enable or a field to fill out that we miss during the instructions. If this article didn't resolve the issue, please use the chat and let us know so that we can update this article! 

 
 

Want to keep learning?

Our team of NetSuite professionals has written articles on a wide variety of NetSuite topics, from SuiteCommerce tips, to recommended NetSuite solutions, to available support services, and more! 

Your cart