Syntax Guidelines and Reference Formats for SDF Custom Objects
Depending on the type of reference or value you want to define in your SDF custom object for SuiteCloud Development Framework (SDF), see the following topics for syntax guidelines and examples:
To reference an object that is external to your SuiteCloud project, see the following topics:
Specifying a Boolean Value
To specify a Boolean value, set the content to either T or F. For example:
<isinactive>F</isinactive>
Specifying a System Enum
To specify a system enum, ensure that the content is in upper case. For example:
<permkey>ADMI_CUSTRECORD</permkey>
Working with Password Fields
When working with password fields, note that any content that you specify is ignored when you deploy the SuiteCloud project. When you import a custom object from a NetSuite account, the password fields are masked as (Encrypted). For example:
<custrecord_password>(Encrypted)</custrecord_password>
Specifying a Standard Object Reference to NetSuite Components
To specify a standard object reference to NetSuite components, ensure that the content is in upper case. For example:
<recordtype>CUSTOMER</recordtype>
Specifying an SDF Custom Object Reference
To specify an SDF custom object reference, ensure that you use a scriptid
attribute=value pair encased in square brackets. For example, the following is an SDF custom object reference to an object with a script ID of custobject_tutorial
:
<recordtype>[scriptid=customrecord_sample]</recordtype>
Script ID descriptors can be set up according to a parent/child relationship, such as a custom field on a record. To specify an object in a hierarchical context, from the object’s XML file, include the reference within square brackets using the following format: [parentscriptid=<scriptid>.
childscriptid=<scriptid>]. In the following example, the script ID of the object is prefixed with the script ID of the parent, where parent script ID is customrecordscriptid
and child script ID is customrecordcustomfieldscriptid
delimited by a period(.):
[scriptid=customrecordscriptid.customrecordcustomfieldscriptid]
Specifying a Reference to an SDF Custom Object in Another SuiteApp
In addition to the scriptid
descriptor, SDF custom object references support an appid
descriptor.
To specify an external SDF custom object reference, include the reference within square brackets in the object’s XML file , using the following format: [appid=<appid>, scriptid=<scriptid>
]. For example, the following is an SDF custom object reference to an object with an application ID of com.samples.mysuiteapp
and a script ID of custobject_tutorial
:
[appid=com.example.mysuiteapp, scriptid=customrecord_example_mysuiteapp_objectname]
When creating script IDs for SDF custom objects in your SuiteApp using SDF or NetSuite, you should always include your company and application names to mitigate Script ID collisions.
In an account customization project, any custom fields or objects that you deploy to a target account cannot be deleted from that account using SuiteCloud Development Framework (SDF). You can only create or modify objects. To delete an SDF custom object, you must remove all object references, and manually delete it from the account.
Specifying a Bundle Object Reference
To specify an external bundle object reference , you must include a bundle id descriptor.
In the object’s XML file where you want to add the reference, use the following format: [bundleid=<number>, scriptid=<scriptid>
]. For example, the following is a reference to an SDF custom object with a bundle ID of 351 and a script ID of custobject_tutorial
:
[bundleid=351, scriptid=customrecord]
You can only reference one bundle ID at the object level.
Specifying a Custom Segment Reference
When working with custom segment references, a type descriptor can be used to reference unified IDs. For example, the following is an SDF custom object reference to a customrecordcustomfield
object with a script ID of customrecordscriptid.customrecordcustomfieldscriptid
that exists in an SDF SuiteApp with the application ID of com.samples.mysuiteapp
:
[appid=com.samples.mysuiteapp, type=customrecordcustomfield, scriptid=customrecordscriptid.customrecordcustomfieldscriptid]
The type descriptor is only supported in custom field references that are generated by the application of a custom segment to a record. These references are typically custom segment unified field IDs. You should always enable unified IDs on custom segments when using them with SDF. By using unified IDs, the script IDs in your custom segment objects do not contain account-specific values, making them more portable and accessible to other NetSuite accounts. For more information about creating a custom segment in NetSuite with unified IDs, see Creating a Custom Segment.
Specifying a Custom File or Script Reference
To specify a custom file or script reference, ensure that the content is the file path encased in square brackets. For example:
<scriptfile>[/SuiteScripts/UserEventScript.js]</scriptfile>
Related Topics
- Developing SDF Custom Objects
- Translatable Fields on SDF Custom Objects
- Downloading the XML Definition of an Object from a NetSuite Account
- SDF Custom Object File Structure
- Account-Specific Values Validation in SuiteCloud Projects
- Date and Time Formats in SDF Custom Objects
- Lists, Records, and Fields
- Reports
- Forms
- Import and Export
- Published Dashboards and Portlets
- Scripting
- Plug-ins
- Centers and Tabs
- Users and Roles in SDF
- Templates
- SuiteCommerce Web Site Management
- SuiteAnalytics Workbooks