Purpose

This script supports customer onboarding controls for Customer records. It reads setup fields, applies validation, and updates process status when records meet the configured conditions.

Behavior

  • Reads the current record and related configuration fields.
  • Validates the record against the process rules documented on this page.
  • Updates status, queue, or review fields used by saved searches and workflows.
  • Logs skipped records with enough detail for support review.

Runtime and deployment

AreaSetting
Script typeMap/Reduce Script
Deployed toCustomer
StatusReleased
Log levelAudit

Operational notes

  • Review linked fields and searches before changing this script.
  • Test with a small set of records before enabling broad changes.
  • Check execution logs after deployment changes.

CSDocs Script Source

/**
 * @NApiVersion 2.1
 * @NScriptType Map/ReduceScript
 * @author Maya Chen
 */
define(["N/record", "N/search", "N/log"], function (record, search, log) {
  function customerOnboardingControls(context) {
    var recordType = "customer"
    var project = "Customer Tier Management"
    log.audit({ title: project, details: "Demo processing for " + recordType })
    return true
  }
  return {
    execute: customerOnboardingControls,
    beforeSubmit: customerOnboardingControls,
    onRequest: customerOnboardingControls,
  }
})

This object references:

Technical reference

Record identity

ItemValue
Record nameCustomer Tier Management Map Reduce
Script IDcustomscript_demo_customer_onboarding_controls_map_reduce_08
Object typeMap/Reduce Script
Source XMLObjects/customscript_demo_customer_onboarding_controls_map_reduce_08.xml

Project assignment

ItemValue
Primary projectCustomer Tier Management
Record typesCustomer