Skip to main content

Creating Custom Segments

Complete guide to setting up custom segments for dimensional tracking in NetSuite.


Prerequisites

  1. Enable Feature: Setup → Company → Enable Features → Accounting → Custom Segments
  2. Permissions: Administrator or role with Custom Segments permission
  3. Planning: Segment name, values, and transaction scope defined

Step 1: Create the Segment

Customization → Lists, Records, & Fields → Custom Segments → New

Basic Configuration

FieldDescriptionExample
LabelDisplay name on formsProject Code
IDSystem identifiercseg_project
DescriptionPurpose documentationTrack costs by project
Record TypeUnderlying recordCustom Segment

Segment Settings

┌─────────────────────────────────────────────────────────┐
│ CUSTOM SEGMENT SETUP │
├─────────────────────────────────────────────────────────┤
│ │
│ Label: [Project Code ] │
│ ID: [cseg_project ] │
│ │
│ ☑ Has GL Impact │
│ └── Creates segment-specific accounts │
│ │
│ ☑ Show in List │
│ └── Appears in segment dropdown │
│ │
│ ☐ Filtered By (optional) │
│ └── Limit values based on parent record │
│ │
└─────────────────────────────────────────────────────────┘

Step 2: Configure GL Impact (Optional)

If Has GL Impact is checked:

Account Numbering

SettingResult
Account SuffixAccount numbers get segment value suffix
Separate AccountsCreates new account for each segment value

Example: GL Impact ON

Base Account: 6000 - Operating Expenses

With Segment Values:
├── 6000:PRJ001 - Operating Expenses : Website Redesign
├── 6000:PRJ002 - Operating Expenses : Mobile App
└── 6000:PRJ003 - Operating Expenses : ERP Implementation

Journal Entry Posts to: 6000:PRJ002

Example: GL Impact OFF

Base Account: 6000 - Operating Expenses

All transactions post to: 6000
Segment value stored for reporting only

Step 3: Define Segment Values

Lists → Accounting → Custom Segments → [Your Segment] → Values

Or via the segment's custom list: Lists → Accounting → Segment Values → New

Value Configuration

FieldDescriptionExample
NameDisplay nameWebsite Redesign
IDValue identifierPRJ001
AbbreviationShort codeWEB
Is InactiveDeactivate without deleting
ParentHierarchy parent(if hierarchical)

Bulk Value Import

For many values, use CSV Import:

Name,External ID,Is Inactive
Website Redesign,PRJ001,F
Mobile App Development,PRJ002,F
ERP Implementation,PRJ003,F
Data Center Migration,PRJ004,F

Import Path: Setup → Import/Export → Import CSV Records → Custom Segment Values


Step 4: Apply to Transactions

Transaction Deployment

Customization → Lists, Records, & Fields → Custom Segments → [Segment] → Applies To

Transaction TypeHeaderLines
Journal Entry
Vendor Bill
Purchase Order
Expense Report
Sales Order
Invoice

Form Placement

Choose where the segment appears:

SettingBehavior
Show on HeaderField appears in transaction header
Show on LinesField appears on each line item
Default ValuePre-populate with default
MandatoryRequire value before save

Step 5: Configure Permissions

Role Access

Setup → Users/Roles → Manage Roles → [Role] → Custom Segments

Permission LevelAccess
NoneCannot see segment
ViewCan see but not edit
CreateCan add new values
EditCan modify values
FullFull access including delete

Value-Level Restrictions

Restrict access to specific segment values:

Role: Regional Manager - APAC
├── Can see: PRJ-APAC-001, PRJ-APAC-002
└── Cannot see: PRJ-AMER-001, PRJ-EMEA-001

Step 6: Form Customization

Add to Transaction Forms

Customization → Forms → Transaction Forms → [Form] → Edit

Screen Fields Tab:
├── Main
│ └── [Drag Project Code field to desired location]
├── Lines
│ └── [Add to line item columns]
└── Related Records

Field Appearance

OptionResult
NormalStandard dropdown
Inline TextDisplay only
HiddenNot visible but available
DisabledVisible but read-only

Hierarchical Segments

Create Parent-Child Structure

Project Code (Hierarchical)
├── Enterprise Projects
│ ├── PRJ-001 Website Redesign
│ └── PRJ-002 Mobile App
├── Internal Projects
│ ├── PRJ-003 ERP Implementation
│ └── PRJ-004 Data Center Migration
└── Customer Projects
├── PRJ-005 Client A Integration
└── PRJ-006 Client B Portal

Configuration

  1. Enable Is Hierarchical on segment
  2. Create parent values first
  3. Set Parent field on child values
  4. Enable Include Children for reporting

Filtered Segments

Filter by Another Field

Limit segment values based on a related field:

Segment: Cost Center
Filtered By: Department

When Department = IT:
Show: CC-IT-001, CC-IT-002, CC-IT-003

When Department = Sales:
Show: CC-SALES-001, CC-SALES-002

Configuration

  1. Create filter source list
  2. Add filter field to segment values
  3. Set Filtered By on segment definition
  4. Map filtering field on transactions

SuiteScript Access

Reading Segment Values

// Get segment value from transaction
const projectCode = record.getValue({
fieldId: 'cseg_project'
});

// Get text value
const projectName = record.getText({
fieldId: 'cseg_project'
});

// Line level
const lineProject = record.getSublistValue({
sublistId: 'item',
fieldId: 'cseg_project',
line: 0
});

Setting Segment Values

// Set on header
record.setValue({
fieldId: 'cseg_project',
value: '123' // Internal ID of segment value
});

// Set on line
record.setSublistValue({
sublistId: 'item',
fieldId: 'cseg_project',
line: 0,
value: '123'
});

Search by Segment

const results = search.create({
type: 'vendorbill',
filters: [
['cseg_project', 'anyof', ['123', '124']]
],
columns: ['tranid', 'cseg_project']
}).run();

Best Practices

Naming Conventions

ElementConventionExample
Segment IDcseg_[name]cseg_project
Value CodeShort, meaningfulPRJ001
Value NameDescriptiveWebsite Redesign Project

Performance Considerations

  • Limit to < 10,000 values per segment
  • Use hierarchies to group large value sets
  • Inactivate obsolete values (don't delete)
  • Index segment fields in saved searches

Governance

PracticeReason
Document segment purposeFuture reference
Control value creationPrevent duplicates
Regular value reviewClean up inactive
Training for usersConsistent usage

See Also