Purpose

This script supports shipping method validation for Lot Numbered Item 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 typeClient Script
Deployed toLot Numbered Item
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 ClientScript
 * @author Maya Chen
 */
define(["N/record", "N/search", "N/log"], function (record, search, log) {
  function shippingMethodValidation(context) {
    var recordType = "lotnumberedinventoryitem"
    var project = "Employee Approval Limits"
    log.audit({ title: project, details: "Demo processing for " + recordType })
    return true
  }
  return {
    execute: shippingMethodValidation,
    beforeSubmit: shippingMethodValidation,
    onRequest: shippingMethodValidation,
  }
})

This object references:

Technical reference

Record identity

ItemValue
Record nameEmployee Approval Limits Client
Script IDcustomscript_demo_shipping_method_validation_client_17
Object typeClient Script
Source XMLObjects/customscript_demo_shipping_method_validation_client_17.xml

Project assignment

ItemValue
Primary projectEmployee Approval Limits
Record typesLot Numbered Item