Field Service ManagementReference

Basic Syntax

Documentation article about Basic Syntax

·2 min read·NetSuite 2026.1·View Oracle Docs

Basic Syntax

Basic Syntax

To understand the syntax of a simple search, we'll use the sample below:

{

"record": "supportcase",

"filters": ["internalid","anyof","${event.supportcase || 0}"],

"map": {

"id": "internalid",

"label": "casenumber"

} }

The record property sets the search type to run or the record type to search for. In the sample above, we're searching for Case records. You can find the ID of the record or search type using the NetSuite record browser. For more information see, Working with the SuiteScript Records Browser.

The filters property sets the search criteria.

The map property sets what results will be returned. In this example, you'll get back an object with two properties: id and label.

--- Context from https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_N3169369.html --- To access the SuiteScript Records Browser, use the following link:

Go to the SuiteScript Records Browser

Important:

When writing SuiteScript, you must use the IDs listed in the NetSuite Help Center. You can access IDs by viewing a NetSuite record's page source, but not all IDs in the source code are supported in SuiteScript. If you create a script that references an unsupported or undocumented ID, and NetSuite later changes the ID, your script may break.

Not all fields in the SuiteScript Records Browser can be set using SuiteScript. Some fields are read only. Check the NetSuite UI to see if a field can be set. Generally, if you can set a field in the UI, you can set it using SuiteScript. If you cannot set a field in the UI, you cannot set it using SuiteScript. However, you can still get the field's value using SuiteScript.

The SuiteScript Records Browser provides a summary of all records, fields, sublists, search joins, search filters, search columns, and record transformations that are supported in SuiteScript. Information about elements is displayed as a series of tables.

To find SuiteScript-supported records and IDs:

Open the SuiteScript Records Browser.

Only records that officially support SuiteScript are listed in the SuiteScript Records Browser.

Click the record you want to reference in SuiteScript.

All IDs currently supported for the record are listed.

The following table provides examples of objects and methods that use each type of ID:

ID Type

Object Examples

Method Examples

Field IDs

serverWidget.Field

record.Field

record.Record

currentRecord.CurrentRecord

Record.getField(options)

CurrentRecord.getField(options)

Record.setValue(options)

CurrentRecord.setValue(options)

record.submitFields(options)

search.lookupFields(options)

Sublist and sublist field IDs

serverWidget.Sublist

Record.commitLine(options)

CurrentRecord.commitLine(options)

Record.getCurrentSublistValue(options)

CurrentRecord.getCurrentSublistValue(options)

Record

Frequently Asked Questions (4)

How can I determine the correct record ID when writing a SuiteScript search?
You can determine the correct record ID by using the NetSuite record browser. This tool provides a summary of all records and the IDs that are officially supported for SuiteScript.
Can all fields in the SuiteScript Records Browser be set using SuiteScript?
No, not all fields in the SuiteScript Records Browser can be set using SuiteScript. Some fields are read-only, and you cannot set them in SuiteScript even if you can retrieve their values.
What is the function of the 'map' property in a simple search syntax?
The 'map' property in the search syntax specifies which results will be returned. In the provided example, the results will include an object with 'id' and 'label' properties.
What should I be cautious about when referencing record IDs in SuiteScript?
Be careful to use only supported and documented IDs in SuiteScript. If an unsupported or undocumented ID is used, and NetSuite changes it, your script may break.

Weekly Update History (1)

Field Service Managementadded

Added a note in Running Searches in Config to add information about search result limits.

View Oracle Docs
Source: Basic Syntax Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?