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

To interact with a subrecord, deploy your server 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 you've loaded the parent record, you can interact with the subrecord.

Subrecord methods don't work in beforeLoad user event scripts, unless you create or load a parent record and interact with the subrecord through that parent.

You can't 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 can't deploy a client script directly to a subrecord type. But you can customize an address form, as explained in the next section.

Client scripts can't be deployed directly to subrecord types.

Client Scripts Deployed on Custom Address Forms

You can create custom forms for address subrecords if needed. This process is described in Customizing Address Forms. With a custom address form, you can add a client script using the Custom Code subtab. In these scripts, you can work with the subrecord like you would with a regular record. This process is not covered in this chapter.

Related Topics

General Notices