Supported Deployments for Subrecord Scripting

A script can interact with subrecord instances only if it uses a supported deployment.

To understand supported deployments, it’s important to understand that every subrecord has a parent record. For more details on this relationship, see About Subrecords.

The following types of deployments are supported:

Server Scripts Deployed on Parent Records

If you want to create a server script that interacts with a subrecord, you can deploy the script on the parent record type. Alternatively, you can deploy the script on a different record type — but then use the script to load the parent record. After loading the parent record, you can interact with the subrecord in the context of its parent.

Subrecord methods are not supported in beforeLoad user event scripts, except if the script creates or loads another record that is a parent, and interacts with the subrecord in the context of that parent.

You cannot deploy a server script directly to a subrecord type.

Client Scripts Deployed on Parent Records (with Limitations)

A client script may not create subrecords on the current record and is limited to read-only access of existing subrecords on the current record. The client script may remove the subrecord from the current record.

You cannot deploy a client script directly on a subrecord type. However, you can customize an address form, as described in the following section.

You cannot deploy a client script directly to a subrecord type.

Client Scripts Deployed on Custom Address Forms

If appropriate, you can create custom forms for the address subrecord. This process is described in Customizing Address Forms. When working with a custom address form, you can attach a client script to the form with the Custom Code subtab. In these types of scripts, you can interact with the subrecord using the same methods as you would with a record. This process is not covered in this chapter.

Related Topics

About Subrecords
Body Field Subrecords and Sublist Subrecords
Structure of a Subrecord
Finding Subrecord Details in the Records Browser
About the Address Subrecord

General Notices