Use -System- as the user in a condition

NetSuite often contains sensitive financial data such as payroll, budgeting, and financial statements. Limiting access to administrators ensures that only authorized personnel can view or modify this critical information, reducing the risk of data breaches or fraudulent activities.

With this, a lot of companies has a Workflow that locks a record whenever the User is not an Administrator. However, it’s common that they’ll encounter an error of “This record has been locked by a user defined workflow” whenever they process their records. This is because the records that are being processed are created by the -System- as the user.

In this article, we will tackle on how to add a condition that will skip the lock record action whenever the record is created by –System-.

Go to your Lock Record Action:

1.) Navigate to your Lock Record in your Workflow

2.) Click on Custom Formula

image.png

3.) Once clicked, it should now convert the condition into a formula format as seen below:

image.png

Note: This formula checks whether the User Role is an Administrator or not.

4.) Add the code below inside the parenthesis of the formula:

And {user.id}!=-4 or ({user.id} is null)

Note: By including this, we will be adding a condition wherein it will also check if the record was created by the System instead of a specific User. Also, NetSuite considers -System- with ID -4 (sometimes -5) which explains why we are using -4 as the user.id.

Once added, the formula should now look like this:

image.png

Note: Feel free to adjust the formula depending on the conditions you’ve set on your action. We would also like to note that this is not possible via Visual Builder as the -System- User is not selectable in the UI.

Leave a comment

Your email address will not be published. Required fields are marked *