NetSuite Bundle v89

Antire Dunning System

Automated payment collection for NetSuite. Send professional dunning letters, track overdue invoices, and manage debt collection with Norwegian legal compliance built-in.

6
Dunning Levels
8
Scripts
7
Custom Records
14
Saved Searches

Quick Navigation

Key Features

Fully Automated

Letters generate and send automatically based on configurable rules. Zero manual intervention for routine operations.

Multi-Level Escalation

6 dunning levels from initial reminder (Betalingspåminnelse) through debt collection (Inkasso).

Multi-Subsidiary

Different procedures per subsidiary with Norwegian legal terminology and regulatory compliance.

Smart Email Routing

Source emails from transactions, customers, or manual override. Supports multiple recipients.

Legal Compliance

Built-in support for Norwegian Inkassoloven requirements including fee limits and notice periods.

Full Audit Trail

Track every letter sent, level change, and payment. Complete dunning history per customer.

Quick Start Guide

Get up and running in 10 minutes

Prerequisites

You need a NetSuite role with access to Custom Records, Script Deployments, and the Antire Dunning center tab.

Verify Dunning is Enabled

Navigate to Setup → Antire Dunning → Configuration. Verify Dunning Enabled is checked.

Review Dunning Procedures

Navigate to Lists → Custom → Antire Dunning Procedure. Verify procedures exist for your subsidiary with correct timing (14 days L1, 28 days L2).

Check Email Templates

Navigate to Templates → Marketing Templates. Verify: Level 1 - Betalingspåminnelse and Level 2 - Inkassovarsel.

Verify Script Deployments

Navigate to Customization → Scripting → Script Deployments. Search "Dunning" - ensure all are Released with daily schedule.

Test the System

Create a test invoice. Check Lists → Custom → Antire Dunning for a new record with Level 0 and status "Awaiting Payment".

You're Ready!

The system now automatically creates dunning records for new invoices and processes them through the workflow based on your configured procedures.

Key Concepts

Essential terminology and system components

What is a Dunning Record?

The central tracking entity linking an invoice to the dunning process. Each unpaid invoice has one active dunning record that tracks its payment status, escalation level, and collection history.

1:1
Invoice Ratio
0-5
Level Range
6
Possible Statuses
Record Type

customrecord_rcs_dunning — Navigate: Lists → Custom → Antire Dunning

What is a Dunning Letter?

The actual communication sent to customers. Letters consolidate all eligible invoices for a customer at a specific dunning level into a single communication.

Email

Method ID: 1

Print

Method ID: 2

Record Type

customrecord_rcs_dunning_letter — Navigate: Lists → Custom → Antire Dunning Letter

What is a Dunning Procedure?

Configuration rules that define when and how dunning letters are generated. Create multiple procedures for different subsidiaries, dunning levels, and business scenarios.

SettingDescriptionExample
Days OverdueDays past due before triggering14, 28
Dunning LevelWhich level this procedure creates1, 2, 3
SubsidiaryTarget subsidiaryNorway AS
Dunning FeeFee to apply (max NOK 70)70.00
Use Transaction EmailSource email from invoiceYes/No

Dunning Levels & Statuses

LevelIDNameNorwegianTiming
01InitialInvoice created
12First ReminderBetalingspåminnelse14 days overdue
23Collection WarningInkassovarsel28 days overdue
34Final NoticeSiste varsel42 days overdue
45Pre-CollectionFør inkasso56 days overdue
56Debt CollectionInkassoManual escalation

Status IDs

1
Awaiting Payment
2
1st Notif Sent
3
2nd Notif Sent
4
Sent to Collection
5
Paid in Full
6
3rd Notif Sent

Dunning Level Flow

Visual progression through the collection process

L0
Level 0
Invoice Created
Awaiting Payment
L1
Level 1
Betalingspåminnelse
14 days
L2
Level 2
Inkassovarsel
28 days
L3
Level 3
Final Notice
42 days
L4-5
Inkasso
Debt Collection
Collection

Norwegian Term: Betalingspåminnelse (Payment Reminder)

Trigger: 14 days past invoice due date

Maximum Fee: NOK 70 (regulated by Inkassoloven)

Email Template: custemailtmpl_dun_template_lvl1

Purpose

Friendly reminder that payment is overdue. This is optional under Norwegian law but recommended as a goodwill gesture.

Norwegian Term: Inkassovarsel (Collection Warning)

Trigger: 28 days past invoice due date

Maximum Fee: NOK 70 (regulated by Inkassoloven)

Email Template: custemailtmpl_dun_template_lvl2

Legal Requirement

Under Inkassoloven §9, a debtor must receive an Inkassovarsel at least 14 days before a claim can be sent to debt collection. This notice is legally required.

Norwegian Term: Inkasso (Debt Collection)

Trigger: Manual escalation or 56+ days overdue

Action: Refer to external collection agency

Important Warning

Once sent to debt collection, this action typically cannot be reversed. Ensure:

  • Inkassovarsel was sent at least 14 days ago
  • All documentation is complete
  • Manager approval obtained

Process Flow Diagrams

Visual representation of system workflows

Complete Dunning Workflow

Main Flow
flowchart TB subgraph TRIGGER["📋 INVOICE CREATED"] A["New Invoice"] --> B{"Dunning\nEnabled?"} B -->|No| X["No Dunning"] B -->|Yes| C{"Procedure\nExists?"} C -->|No| D["Use Default"] C -->|Yes| E["Use Subsidiary Procedure"] end subgraph INIT["📝 DUNNING RECORD"] D --> F["Create Dunning Record"] E --> F F --> G["Level 0\nAwaiting Payment"] end subgraph DAILY["⏰ SCHEDULED PROCESSING"] H["Map/Reduce Script\nruns daily"] --> I["Load Active Procedures"] I --> J["Search Eligible Records\nDays Overdue + Filters"] J --> K{"Found?"} K -->|No| L["Wait for next run"] K -->|Yes| M["Group by Customer\n+ Due Date + Email"] end subgraph LETTER["✉️ CREATE LETTERS"] M --> N["Create Dunning Letter"] N --> O["Advance Level"] O --> P["Link to Letter"] end subgraph SEND["📤 SEND LETTERS"] Q["Send Script"] --> R{"Method?"} R -->|Email| S["Merge Template\nSend Email"] R -->|Print| T["Generate PDF\nSave to Folder"] S --> U["Mark Sent"] T --> U end G --> H P --> Q L -.-> H U -.-> H style TRIGGER fill:#e0f2fe,stroke:#0284c7 style INIT fill:#dcfce7,stroke:#16a34a style DAILY fill:#fef3c7,stroke:#d97706 style LETTER fill:#f3e8ff,stroke:#9333ea style SEND fill:#ffe4e6,stroke:#e11d48

Email Address Resolution Flow

Email Logic
flowchart LR A["Start"] --> B{"Use Transaction\nEmail?"} B -->|No| C["Use Customer\nEmail Field"] B -->|Yes| D["Check Invoice\nEmail Field"] D --> E{"Has Email?"} E -->|No| C E -->|Yes| F{"Use First\nEmail Only?"} F -->|Yes| G["Take First\nEmail Only"] F -->|No| H["Use All\nEmails"] C --> I["Send Letter"] G --> I H --> I style A fill:#f0fdf4,stroke:#16a34a style I fill:#fef2f2,stroke:#dc2626

System Architecture

Technical
flowchart TB subgraph Records["📁 Custom Records"] R1["Antire Dunning"] R2["Antire Dunning Letter"] R3["Antire Dunning Procedure"] R4["Antire Dunning Configuration"] R5["Antire Dunning Level Map"] end subgraph Scripts["⚙️ Scripts"] S1["rc-norway-dunning-ue.js\n(User Event)"] S2["rc-norway-dunning-mr.js\n(Map/Reduce)"] S3["rc-norway-dunning-letter-send-mr.js\n(Map/Reduce)"] end subgraph Libs["📚 Libraries"] L1["rc-norway-lib.js"] L2["rc-norway-def-lib.js"] end S1 --> R1 S2 --> R1 S2 --> R2 S3 --> R2 S1 --> L1 S2 --> L1 S3 --> L1 L1 --> L2 style Records fill:#dbeafe,stroke:#2563eb style Scripts fill:#fef3c7,stroke:#d97706 style Libs fill:#f3e8ff,stroke:#9333ea

User Roles

Who does what in the dunning system

Dunning Manager

Primary user responsible for daily dunning operations and customer communication.

  • Review dunning records daily
  • Pause/resume dunning for specific customers
  • Approve escalations to debt collection
  • Handle customer disputes
  • Set agreed payment dates
  • Monitor email delivery

Finance Team

Oversees financial impact and reconciliation of dunning activities.

  • Monitor overdue invoice aging
  • Track dunning fee revenue
  • Reconcile payments received
  • Review debt collection referrals
  • Generate AR reports
  • Audit dunning compliance

System Administrator

Maintains system configuration, scripts, and technical operations.

  • Configure dunning procedures
  • Manage email templates
  • Monitor script deployments
  • Troubleshoot errors
  • Manage user permissions
  • Update PDF templates

Daily Tasks

Morning checklist for Dunning Managers

Morning Checklist

Check Script Execution Logs

Navigate to Customization → Scripting → Script Deployments. Verify no errors in overnight runs.

Review New Dunning Letters

Check Lists → Custom → Antire Dunning Letter for letters created overnight. Verify correct recipients.

Check Held Letters

Filter for "Hold Email = Yes" to review any letters pending manual release.

Review Paused Dunning

Check for records with "Pause Dunning = Yes" that may need to be resumed.

Monitor Debt Collection Queue

Review records flagged "To Be Sent For Debt Collection" before processing.

Common Scenarios

Find the Dunning Record

Search Lists → Custom → Antire Dunning by customer name or invoice number.

Set Agreed Payment Date

Enter the promised date in Agreed Payment Date field.

Pause Dunning

Check Pause Dunning and enter reason: "Payment promised for [date]"

Set Calendar Reminder

Create reminder to follow up if payment not received by agreed date.

Pause Dunning Immediately

Check Pause Dunning with reason: "Under dispute - [brief description]"

Document the Dispute

Add notes to the dunning record with dispute details and customer contact.

Escalate Internally

Notify accounts receivable or sales team to resolve the dispute.

Resume When Resolved

Once resolved, uncheck Pause and allow normal processing to continue.

Pause Dunning

Check Pause Dunning with reason: "Payment plan agreed - [frequency/amount]"

Document Plan Details

Record payment schedule, amounts, and dates in the dunning record notes.

Set Monitoring Schedule

Create reminders to verify each scheduled payment is received.

Resume if Defaulted

If customer misses a payment, uncheck Pause and resume dunning from current level.

Step-by-Step Procedures

How to perform common dunning operations

How to Pause Dunning

Navigate to the Dunning Record

Lists → Custom → Antire Dunning. Search by customer name or invoice number.

Click Edit

Open the record in edit mode.

Check "Pause Dunning"

Find the custrecord_rcs_dun_pause_chbx checkbox and check it.

Enter Pause Reason

Select or enter a reason in custrecord_rcs_dun_pause (required for audit trail).

Save the Record

Click Save. The record will be excluded from all future dunning processing until resumed.

How to Escalate to Debt Collection

Verify Prerequisites

Confirm: Inkassovarsel sent ≥14 days ago, all documentation complete, manager approval obtained.

Open the Dunning Record

Navigate to the dunning record and click Edit.

Check "To Be Sent For Debt Collection"

Check the custrecord_rcs_dun_debt_collection_chbx checkbox.

Save and Process

Save the record. The scheduled script will process the escalation and set the "Sent To Debt Collection" flag.

Legal Warning — Inkassoloven Requirements

Before sending to debt collection, Norwegian law requires:

  • Inkassovarsel must be sent at least 14 days before debt collection
  • Maximum dunning fee per notice: NOK 70
  • All communication must be documented

System Configuration

Global settings and procedure setup

Configuration Record

Navigate: Setup → Antire Dunning → Configuration or Lists → Custom → Antire Dunning Configuration

SettingField IDDescription
Dunning Enabledcustrecord_rcs_is_dunning_enabledMaster switch to enable/disable all dunning globally
Default Dunning Procedurecustrecord_rcn_default_dunning_procedureFallback procedure when no subsidiary-specific procedure exists

Dunning Procedure Setup

Navigate: Lists → Custom → Antire Dunning Procedure

FieldField IDDescription
NamenameProcedure name (e.g., "Norway L1 - 14 Days")
Dunning Levelcustrecord_rcs_dp_levelTarget level (1-5)
Days Overduecustrecord_rcs_dp_days_to_send_letterDays past due to trigger
Subsidiarycustrecord_rcs_dp_subsidiaryTarget subsidiary
Saved Searchcustrecord_rcs_dp_saved_search_dunSearch for eligible records
Letter Templatecustrecord_rcs_dunning_letter_templatePDF template script ID
Dunning Feecustrecord_rcs_dp_dunning_feeFee amount (max NOK 70)
Fee Percentcustrecord_rcs_dp_dunning_fee_percentPercentage-based fee
Send Fromcustrecord_rcs_dp_email_sent_fromEmployee to send from
Use Tran Emailcustrecord_rcs_dp_use_tran_email_addressSource email from transaction
Use First Emailcustrecord_rcs_dp_use_tran_first_emailUse only first email if multiple
Is L0 Procedurecustrecord_rcs_dp_l0_procedureMark as Level 0 (initial) procedure
Rule Ordercustrecord_rcs_dp_rule_orderProcessing sequence
Print Foldercustrecord_rcs_dp_print_idFolder for PDF output

Bundle Contents

Complete inventory of NetSuite Bundle v89

7
Custom Records
8
Scripts
6
Libraries
14
Saved Searches
4
Custom Lists
8
Custom Fields
Record NameScript IDPurpose
Antire Dunningcustomrecord_rcs_dunningMain dunning tracking record
Antire Dunning Lettercustomrecord_rcs_dunning_letterDunning communication records
Antire Dunning Procedurecustomrecord_rcs_dunning_procedureConfiguration rules
Antire Dunning Configurationcustomrecordrcs_config_recordGlobal settings
Antire Dunning Levelcustomrecord_rcs_dunning_levelsLevel definitions (5 records)
Antire Dunning Level Mapcustomrecord_rcs_dunning_level_mapLevel transition rules (5 records)
Antire Dunning Statuscustomrecord_rcs_dunning_statusStatus definitions (6 records)

Entity Fields (Customer)

Field NameField ID
Antire Dunning Managercustentity_rcs_dunning_manager
Exclude from Dunningcustentity_ant_cus_exclude_from_dun
Antire Dunning Sending Methodcustentity_rcn_cust_dun_send_method

Transaction Body Fields

Field NameField ID
Antire Dunning Fees Checkboxcustbody_rcs_dunning_fees_inv_checkbox
Transaction Related Emailcustbody_rcs_dun_tran_rel_email
Exclude from Dunningcustbody_ant_tran_exclude_from_dun
Related Antire Dunning Recordcustbody_rm_related_rcs_dunning_record
Antire Dunning Feescustbody_rcs_dunning_fees_inv_2
List NameList IDValues
Antire Dunning Pause Reasoncustomlist_rcs_dunning_pause_reason4 records
Antire Dunning Letter Listcustomlist_rcs_dl_list3 records
Antire Dunning Feescustomlist_ot_rcs_dunning_fee2 records
Antire Dunning Sending Methodcustomlist_rcs_dunning_send_meth2 records (Email, Print)

Advanced PDF Templates

Template NameScript ID
Antire Dunning Letter - Master Templatecusttmpl_216_6227880_270
Antire Dunning Letter Template - Teqvacusttmpl_615_7083689_942

Email Templates

Template NameScript IDLevel
Level 1 - Betalingspåminnelsecustemailtmpl_dun_template_lvl1Level 1
Level 2 - Inkassovarselcustemailtmpl_dun_template_lvl2Level 2

System Architecture

How the components work together

User Event Layer

Triggers on record create/edit. Creates initial dunning records when invoices are created. Sources email addresses from transactions.

Map/Reduce Layer

Scheduled batch processing. Creates dunning letters, sends emails, generates PDFs. Handles large volumes efficiently.

Library Layer

Shared business logic. Configuration loading, email sending, PDF rendering, level transitions. Used by all scripts.

Processing Flow

1. Invoice Created → User Event creates Dunning Record (Level 0)

2. Daily at 2 AM → Map/Reduce finds eligible records, creates Dunning Letters

3. Daily at 4 AM → Map/Reduce sends letters via email or saves PDFs

4. Cycle Repeats → Records advance through levels based on days overdue

Scripts Reference

All SuiteScripts in the bundle

Map/Reduce Scripts (4)

rc-norway-dunning-mr.jsMap/Reduce

Script ID: customscript_rcn_dunning_letter_mr

Deployment: RCN | Dunning Letter | MR

Schedule: Daily at 2:00 AM

Purpose: Main processing script. Loads dunning procedures, searches for eligible records based on days overdue, groups by customer/due date/email, creates dunning letters, and advances level.

Parameters: custscript_rcn_dunning_letter_subsidiar — Optional subsidiary filter

rc-norway-dunning-letter-send-mr.jsMap/Reduce

Script ID: customscript_rcn_dunning_letter_send_mr

Deployment: RCN | Dunning Letter Send | MR

Schedule: Daily at 4:00 AM

Purpose: Sends generated dunning letters. Finds unsent letters, validates email addresses, merges templates, sends emails or generates PDFs, marks as sent.

Parameters: custscript_rcn_dunning_letter_send_sub — Optional subsidiary filter

rm-mr-create-dunning-records.jsMap/Reduce

Script ID: customscript_rm_mr_create_dunning_record

Deployment: RM | MR | Create Dunning Records

Schedule: On-demand

Purpose: Batch creates dunning records from a saved search of transactions. Used for initial setup or backfill processing.

Parameters: custscript_rm_tran_srch_for_dunning_rec — Saved search ID

rc-norway-dunning-fee-mr.jsMap/Reduce

Script ID: customscript_rcn_add_dunning_fees_mr

Deployment: RCN | Add Dunning Fees | MR

Schedule: Monthly

Purpose: Creates subscription fee items for dunning charges based on configured percentages. Integrates with Zone Advanced Billing (ZAB).

User Event Scripts (4)

rc-norway-dunning-ue.jsUser Event

Script ID: customscript_rcn_dunning_create_invoice

Deployment: RCN | Dunning Creation | UE

Triggers: After Submit on Invoice, Dunning Letter

Purpose: Creates initial dunning record when invoice is created. Links to appropriate dunning procedure based on subsidiary. Also populates dunning level history JSON on letters.

AN-UE-Dunning-Related-Customizations-On-Multiple-Records.jsUser Event

Script ID: customscript_an_ue_dun_rel_rec_cust

Deployments: customdeploy_an_ue_dun_rel_rec_cust_dunl (Dunning Letter), customdeploy_an_ue_dun_rel_rec_cust_dunr (Dunning Record)

Purpose: Sources email addresses from transactions and sets them on dunning-related fields. Handles "Use Transaction Email" and "Use First Email" settings.

AN_UE_Source_Email_Addresses_From_Transaction.jsUser Event

Script ID: customscript_an_ue_src_email_addr_frm_tr

Deployment: AN | UE | Source Email Address From Tran

Purpose: Alternative email sourcing script. Extracts email from transaction JSON data and populates the email field on dunning letters.

rc-norway-sublist-report-field-ue.jsUser Event

Script ID: customscript_rcn_sublist_rprt_flds_ue

Deployment: RCN Sublist Report Fields UE

Purpose: Adds "Refresh report data" button on dunning records. Updates sublist data from related records for display purposes.

Libraries (6)

LibraryFile IDPurpose
rc-norway-lib.js1291753Core library: email sending, PDF rendering, record updates, searches
rc-norway-def-lib.js1291752Definitions: record types, field IDs, status enums, level mappings
rc-norway-auto-email-lib.js1291755Automated email functionality
rc-xml-parser-lib.js1291754XML parsing for bank file processing
cs-form-builder-lib.js1291751Dynamic form building utilities
cs-moment.js1291750Date/time formatting (Moment.js)

Field Reference

Complete field reference for main records

FieldField IDType
Invoicecustrecord_rcs_dun_invoiceList/Record
Customercustrecord_rcs_dun_customerList/Record
Dunning Statuscustrecord_rcs_dun_statusList
Dunning Levelcustrecord_rcs_dunning_levelList
Dunning Procedurecustrecord_rcn_dun_rec_dunning_procedureList/Record
Invoice Amountcustrecord_rcs_dun_inv_amountCurrency
Due Amountcustrecord_rcs_dun_inv_due_amountCurrency
Invoice Due Datecustrecord_rcs_dun_inv_due_dateDate
Dunning Due Datecustrecord_rcs_dun_dunning_duedateDate
Pause Dunningcustrecord_rcs_dun_pause_chbxCheckbox
Pause Reasoncustrecord_rcs_dun_pauseList
Agreed Payment Datecustrecord_rcs_dun_agreed_dateDate
To Be Sent For Debt Collectioncustrecord_rcs_dun_debt_collection_chbxCheckbox
Sent To Debt Collectioncustrecord_rcs_dun_sent_debt_collec_chbxCheckbox
Dunning Letter Sentcustrecord_rcs_dun_dunning_letter_sentCheckbox
Dunning Letter Sent Datecustrecord_rcs_dun_dl_sent_dateDate
Lockedcustrecord_rcs_dun_locked_checkboxCheckbox
FieldField IDType
Customercustrecord_rcs_dl_customerList/Record
Subsidiarycustrecord_rcs_dl_subsidiaryList/Record
Dunning Levelcustrecord_rcs_dl_letterList
Dunning Procedurecustrecord_rcs_dl_dunning_procedureList/Record
Email Contactcustrecord_rcs_dl_emailEmail
Email From Transactioncustrecord_rcs_dl_email_from_transactionText
Email Templatecustrecord_rcs_dl_email_tamplateList/Record
Sending Methodcustrecord_rcs_dl_sending_methodList
Dunning Feecustrecord_rcs_dl_feeCurrency
Dunning Fee Percentcustrecord_rcs_dl_dunning_fee_percentPercent
Sentcustrecord_rcs_dl_sent_checkboxCheckbox
Sent Datecustrecord_rcs_dl_sent_dateDate
Hold Emailcustrecord_rcs_dl_hold_emailCheckbox
Send Attachmentscustrecord_rcs_dl_send_attachmentsCheckbox
Dunning Hidden JSONcustrecord_rcs_dl_dunning_hidden_jsonLong Text
FieldField IDType
NamenameText
Dunning Levelcustrecord_rcs_dp_levelList
Days Overduecustrecord_rcs_dp_days_to_send_letterInteger
Subsidiarycustrecord_rcs_dp_subsidiaryList/Record
Saved Searchcustrecord_rcs_dp_saved_search_dunList/Record
Letter Templatecustrecord_rcs_dunning_letter_templateText
Email Templatecustrecord_rcs_dp_email_templateList/Record
Dunning Feecustrecord_rcs_dp_dunning_feeCurrency
Fee Percentcustrecord_rcs_dp_dunning_fee_percentPercent
Send From Employeecustrecord_rcs_dp_email_sent_fromList/Record
Use Transaction Emailcustrecord_rcs_dp_use_tran_email_addressCheckbox
Use First Emailcustrecord_rcs_dp_use_tran_first_emailCheckbox
Is L0 Procedurecustrecord_rcs_dp_l0_procedureCheckbox
Rule Ordercustrecord_rcs_dp_rule_orderInteger

Saved Searches

All saved searches in the bundle

Search NameScript IDCategory
Antire Dunning Records - Allcustomsearch_all_rcs_dunning_recordsDunning
Antire Dunning - Procedures - Allcustomsearch_rcs_dunning_status_remin__2Dunning
#Antire Dunning Records - Default Procedure#customsearch_rcs_default_procedure_srchDunning
#Antire Dunning (Procedure) - Default Subsidiarycustomsearch_rcs_default_procedure_subsDunning
*Antire Dunning Letter Search for Levels - Do not DELETE*customsearch_dunning_let_search_by_levelLetter
Antire Dunning Letters - No Dunningcustomsearch_rcs_dunning_letters_2Letter
Antire Dunning Letters - Allcustomsearch_rcs_dunning_lettersLetter
Antire Dunning Level Map Next Stepcustomsearch443Level Map
Antire Dunning Procedurecustomsearch_rcs_dp_overviewProcedure
Antire Dunning Script Deploymentscustomsearch_rcs_dunning_deploymentDeployment
*|MR| Dunning - Transaction Search - Creating Dunning Recordscustomsearch_rm_tran_dun_create_mrTransaction
#Antire Dunning Related Transactions#customsearch_rcs_dunning_open_invoicesTransaction
*|MR| Dunning - Transaction Search - Creating Dunning Records - Teqvacustomsearch_rm_tran_dun_create_mr_2Transaction
Important: Do Not Delete Critical Searches

Searches marked with * are referenced by scripts and must not be deleted or modified without understanding the impact. Deleting these will cause script failures.

Troubleshooting

Common issues and solutions

Check these items:

Verify Dunning is Enabled

Navigate to Lists → Custom → Antire Dunning Configuration. Ensure Dunning Enabled is checked.

Check Subsidiary Procedure

Verify a dunning procedure exists for the invoice's subsidiary with Is L0 Procedure checked.

Verify Script Deployment

Navigate to Customization → Scripting → Script Deployments. Search for RCN | Dunning Creation | UE. Ensure status is Released and deployed to Invoice records.

Check Execution Logs

View deployment execution log for errors. Look for "dunningRecord Created" success message.

Check these items:

Verify Letter Has Email Address

Open the dunning letter. Check either Email Contact or Email From Transaction has a value.

Check Hold Email Flag

Ensure Hold Email checkbox is NOT checked.

Verify Related Dunning Records Not Paused

Check that linked dunning records have Pause Dunning unchecked.

Check Send From Employee

Verify the Send From Employee is set on the procedure and the employee has a valid email.

Check Script Deployment

Verify RCN | Dunning Letter Send | MR is Released and scheduled.

Email address priority (highest to lowest):
  1. Email From Transaction — If "Use Transaction Email" is enabled on procedure
  2. First Email Only — If "Use First Email" is also enabled
  3. Customer Email — Default fallback from dunning letter record
Solution

Check the procedure settings for Use Transaction Email and Use First Email. Verify the invoice has the correct email in custbody_rcs_dun_tran_rel_email.

How to diagnose:

Find the Deployment

Navigate to Customization → Scripting → Script Deployments. Search for the script name.

View Execution Log

Click on the deployment, then click the Execution Log tab.

Filter for Errors

Filter by Type = "Error" to see only error entries.

Review Error Details

Click on each error to see the full stack trace and context.

Common error codes:
ErrorCauseSolution
RCRD_DSNT_EXISTRecord ID doesn't existVerify record hasn't been deleted
INVALID_FLD_VALUEBad field valueCheck field type and valid values
SSS_MISSING_REQD_ARGUMENTMissing required parameterReview script parameters
INSUFFICIENT_PERMISSIONAccess deniedCheck script execution role
Common PDF issues:
IssueSolution
Missing VAT number / footerUse render.transaction() instead of record.load() for invoice attachments
Template not foundVerify Letter Template script ID on procedure matches actual template
Blank PDFCheck template has proper FreeMarker syntax and record data is available
PDF not savingVerify Print Folder on procedure points to valid File Cabinet folder

Frequently Asked Questions

Quick answers to common questions

You have two options:

  1. Per-Invoice: Pause each dunning record individually (temporary)
  2. Customer-Level: Check Exclude from Dunning on the customer record (permanent)

The customer-level exclusion prevents new dunning records from being created for any future invoices.

Yes, but you'll need to manually trigger it:

  1. Open the dunning letter record
  2. Uncheck the Sent checkbox
  3. Clear the Sent Date field
  4. Save the record
  5. The letter will be picked up in the next scheduled send run

The dunning record's Due Amount field is sourced from the invoice and updates automatically when payments are applied. The dunning process continues based on the remaining balance. If paid in full, the status changes to "Paid in Full" and dunning stops.

Under Inkassoloven (Norwegian Debt Collection Act):

  • Inkassovarsel required: Must send at least 14 days before debt collection
  • Maximum fee: NOK 70 per dunning notice
  • Interest rules: Maximum rate set by Norges Bank + margin
  • Documentation: Must maintain records of all communication

Default schedule:

  • Dunning Letter Creation (rc-norway-dunning-mr): Daily at 2:00 AM
  • Dunning Letter Send (rc-norway-dunning-letter-send-mr): Daily at 4:00 AM
  • Dunning Record Creation: On-demand only
  • Dunning Fees: Monthly

Schedules can be modified in the script deployment settings.

Yes. The Map/Reduce scripts have a subsidiary parameter:

  • custscript_rcn_dunning_letter_subsidiar — For letter creation
  • custscript_rcn_dunning_letter_send_sub — For letter sending

Set these in the script deployment parameters to process only specific subsidiaries.

Glossary

Key terms and definitions

Dunning
The process of systematically communicating with customers to collect overdue payments through escalating notices.
Betalingspåminnelse
Norwegian for "Payment Reminder" — Level 1 notice sent 14 days after invoice due date.
Inkassovarsel
Norwegian for "Collection Warning" — Level 2 notice sent 28 days after due date. Legally required before debt collection.
Inkasso
Norwegian for "Debt Collection" — Referral to external collection agency for recovery of unpaid debts.
Inkassoloven
Norwegian Debt Collection Act — Legislation governing debt collection practices including notice requirements and fee limits.
Dunning Level
Escalation stage in the collection process (0-5), representing increasing urgency and communication intensity.
Dunning Procedure
Configuration record defining rules for when and how dunning letters are generated for a specific subsidiary and level.
Map/Reduce Script
NetSuite script type optimized for processing large data volumes in parallel, used for batch dunning operations.
User Event Script
NetSuite script that runs automatically when records are created, edited, or deleted. Triggers dunning record creation.
Subsidiary
Legal entity within NetSuite representing a company, business unit, or geographic region with separate accounting.