---
schema_version: "1"
id: 2d0e8a44631de69916ac1f65b9ba41226489643eec8605beb5874fd2480bc993
title: LifeScienceCustomScript
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/life_sciences_dev_guide/sforce_api_objects_lifesciencecustomscript.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.life_sciences_dev_guide.meta/life_sciences_dev_guide/sforce_api_objects_lifesciencecustomscript.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8ca76e58edc1eafa0d1d39100d8b4f70e7539cb6d139cefe757b813ad92a756e
description: Represents a custom script associated with a Life Science stage object within a workflow. Use a custom script to implement the validation logic for the stage object. This object is available in API version 65.0 and later.
---
# LifeScienceCustomScript

Represents a custom script associated with a Life Science stage object within a workflow. Use a custom script to implement the validation logic for the stage object. This object is available in API version 65.0 and later.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

## Fields

### CodeText

- **Type**: textarea
- **Properties**: Nillable
- **Description**: The JavaScript code associated with a Lightning web component.

### ComponentName

- **Type**: string
- **Properties**: Create, Filter, Group, Sort, Update
- **Description**: Required. The name of the Lightning web component that contains the custom script.

### Name

- **Type**: string
- **Properties**: Create, Filter, Group, idLookup, Sort, Update
- **Description**: The name of the Life Science custom script record.

### ObjectName

- **Type**: string
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: For a Mobile Page Layout Validation script, the name of the object associated with the custom script.

### OperationEventType

- **Type**: picklist
- **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- **Description**: For a Mobile Page Layout Validation script, the type of operation that the custom script supports.
- **Possible values**:
    - OnCreate
    - OnDelete
    - OnUpdate

### OwnerId

- **Type**: reference
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: The ID of the owner of the record.
    
    This field is a polymorphic relationship field.
- **Relationship Name**: Owner
- **Refers To**: Group, User

### SourceSystemIdentifier

- **Type**: string
- **Properties**: Create, Filter, Group, idLookup, Nillable, Sort, Update
- **Description**: An external ID from the source system for data integrations.

### SourceSystemName

- **Type**: string
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The name of the source system for data integrations.

### Type

- **Type**: picklist
- **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update
- **Description**: Required. The type of custom script.
- **Possible values**:
    - Checklist
    - MobilePageLayoutDataValidation
    - OrderValidation
    - Validation

## Associated Objects

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.

[LifeScienceCustomScriptShare](https://developer.salesforce.com/docs/atlas.en-us.life_sciences_dev_guide.meta/life_sciences_dev_guide/sforce_api_associated_objects_share.htm "StandardObjectNameShare is the model for all share objects associated with standard objects. These objects represent a sharing entry on the standard object.")

Sharing is available for the object.