NetLease - Automation Rules
Overview
Automation Rules allow lease records to be created automatically from existing NetSuite transactions such as Purchase Orders. Rather than manually entering lease details, an automation rule monitors qualifying transactions and generates lease records with the correct field values pre-populated based on configurable field mappings.
This feature reduces manual data entry, improves accuracy, and streamlines the lease creation process for organizations that originate leases from standard procurement workflows.
Prerequisites
- The user configuring automation rules must have access to the NetLease Automation Rule record type
- If using a saved search to filter qualifying records, the saved search must be created in advance
Step-by-Step Process
Create an Automation Rule
- Navigate to NetLease > NetLease Setup > Manage Automation Rules
- Click New NetLease Automation Rule to create a new automation rule
- Configure the following fields:
| Field | Description |
| Deployment Type | Determines when the rule runs: Record (fires when a transaction is saved), Scheduled (runs on a defined schedule), or Suitelet (manual trigger). |
| Automation Type | Defines what the rule does. Currently, the available option is Create Lease from Transaction. |
| Trigger Type | Specifies the event that initiates the rule, such as After Submit, Before Submit, Add Button (adds a manual execution button to the transaction form), or Scheduled. |
| Transaction Types | Select which transaction types the rule applies to, such as Purchase Orders. Multiple transaction types can be selected. |
| Saved Search | Optionally assign a saved search to filter which specific records qualify for automation (e.g., only Purchase Orders with a specific approval status or vendor category). If needed, adding date-based criteria to the saved search can help prevent the rule from triggering on historical transactions. |
- Click Save
When an Automation Rule is saved, NetLease automatically activates it on the selected transaction types. No additional setup is required.
Configure Custom Sourcing (Field Mapping)
When a Create Lease from Transaction rule is saved for the first time, a Custom Sourcing record is automatically created and pre-configured to map the Lease Type from the transaction line to the lease. Additional field mappings can be configured by creating more Custom Sourcing records.
For each transaction type, a set of fields are automatically carried over to the lease without any additional configuration — including Subsidiary, Transaction Date (as Commencement Date), Class, Location, Department, and Memo. These defaults can be overridden using Custom Sourcing records.
To create a new custom sourcing record:
- Navigate to NetLease > NetLease Setup > Manage Custom Sourcing
- Click New NetLease Custom Sourcing and enter a meaningful Name for the custom sourcing record
- Set the Type to Automation Rule.
- Select the appropriate From Transaction Field and To Lease Field
- Click Save to create the record
For more information, see Manage Custom Sourcing.
Rule Execution Behavior
The way a rule executes depends on its Deployment Type:
Record-deployed rules fire automatically when a user saves a qualifying transaction. A banner message is displayed on the transaction confirming success or reporting errors.
Scheduled rules follow the same logic but are triggered on a defined schedule rather than on transaction save. This approach is useful for bulk processing or when automation should not affect transaction entry performance.
Scheduled rules require additional configuration. See the Scheduled Rule Configuration section below for details.
Button-triggered rules add a button to the transaction form. When clicked, the rule executes immediately on that specific record, giving users manual control over the lease creation process.
Scheduled Rule Configuration
Note: Configuring script deployments requires access to Customization > Scripting in NetSuite, which is typically restricted to NetSuite administrators. This step is usually completed during initial implementation or with assistance from a system administrator.
Scheduled rules require a script deployment to be configured with the desired schedule and status. To configure a scheduled rule deployment:
- Navigate to Customization > Scripting > Scripts
- Locate the NetLease - Automation MR script and click View
- Navigate to the Deployments subtab and click on one of the available deployments (e.g., NetLease - Automation MR 1)
- Click Edit on the script deployment record
- Verify the following:
- The Status field is set to Scheduled
- The Deployed checkbox is selected
- Navigate to the Schedule subtab and set the desired schedule timeframe
- Optionally, navigate to the Parameters subtab and select a specific automation rule in the NetLease Automation Rule field to target a single rule. If left blank, the deployment runs all active scheduled rules.
- Click Save
After Lease Creation
Leases created through automation rules are populated based on the custom sourcing configuration. Depending on the extent of the field mappings, additional configuration may be required on the lease record before schedule generation and commencement — such as adjusting payment details, assigning a discount rate, or completing accounting information. Review each created lease to confirm all fields are accurate before proceeding. For guidance on completing lease setup, see NetLease - Create a New Lease Record and NetLease - Establish Payment Details.
Considerations
- Transaction lines already linked to a lease are automatically skipped — executing a rule multiple times on the same transaction does not create duplicate leases
- If no custom sourcing overrides the commencement date, it defaults to the transaction date
- Saved searches provide fine-grained control over which records qualify for automation, such as filtering by approval status, vendor category, or other transaction attributes
- Each created lease is linked back to the source transaction via the Lease column on the transaction line
- Depending on the rule configuration, automation rules may trigger on historical transactions. To prevent a rule from processing historical records, add date-based criteria to the associated saved search (e.g., Transaction Date is on or after a specific date).
