Creating Custom Segments
Complete guide to setting up custom segments for dimensional tracking in NetSuite.
Prerequisites
- Enable Feature: Setup → Company → Enable Features → Accounting → Custom Segments
- Permissions: Administrator or role with Custom Segments permission
- Planning: Segment name, values, and transaction scope defined
Step 1: Create the Segment
Navigation
Customization → Lists, Records, & Fields → Custom Segments → New
Basic Configuration
| Field | Description | Example |
|---|---|---|
| Label | Display name on forms | Project Code |
| ID | System identifier | cseg_project |
| Description | Purpose documentation | Track costs by project |
| Record Type | Underlying record | Custom 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
| Setting | Result |
|---|---|
| Account Suffix | Account numbers get segment value suffix |
| Separate Accounts | Creates 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
Navigation
Lists → Accounting → Custom Segments → [Your Segment] → Values
Or via the segment's custom list: Lists → Accounting → Segment Values → New
Value Configuration
| Field | Description | Example |
|---|---|---|
| Name | Display name | Website Redesign |
| ID | Value identifier | PRJ001 |
| Abbreviation | Short code | WEB |
| Is Inactive | Deactivate without deleting | ☐ |
| Parent | Hierarchy 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 Type | Header | Lines |
|---|---|---|
| Journal Entry | ☑ | ☑ |
| Vendor Bill | ☑ | ☑ |
| Purchase Order | ☑ | ☑ |
| Expense Report | ☑ | ☑ |
| Sales Order | ☐ | ☑ |
| Invoice | ☐ | ☑ |
Form Placement
Choose where the segment appears:
| Setting | Behavior |
|---|---|
| Show on Header | Field appears in transaction header |
| Show on Lines | Field appears on each line item |
| Default Value | Pre-populate with default |
| Mandatory | Require value before save |
Step 5: Configure Permissions
Role Access
Setup → Users/Roles → Manage Roles → [Role] → Custom Segments
| Permission Level | Access |
|---|---|
| None | Cannot see segment |
| View | Can see but not edit |
| Create | Can add new values |
| Edit | Can modify values |
| Full | Full 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
| Option | Result |
|---|---|
| Normal | Standard dropdown |
| Inline Text | Display only |
| Hidden | Not visible but available |
| Disabled | Visible 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
- Enable Is Hierarchical on segment
- Create parent values first
- Set Parent field on child values
- 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
- Create filter source list
- Add filter field to segment values
- Set Filtered By on segment definition
- 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
| Element | Convention | Example |
|---|---|---|
| Segment ID | cseg_[name] | cseg_project |
| Value Code | Short, meaningful | PRJ001 |
| Value Name | Descriptive | Website 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
| Practice | Reason |
|---|---|
| Document segment purpose | Future reference |
| Control value creation | Prevent duplicates |
| Regular value review | Clean up inactive |
| Training for users | Consistent usage |
See Also
- Custom Segments Overview - Introduction to segments
- Transaction Impact - How segments affect transactions
- Reporting & Analytics - Using segments in reports