---
schema_version: "1"
id: 4ceedbe67ba30c451a43f4c32a6d4ba95bd8dd69a351b3a467f76cef2a879ae4
title: CodeSet
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/life_sciences_dev_guide/hc_r4_api_objects_CodeSet.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.life_sciences_dev_guide.meta/life_sciences_dev_guide/hc_r4_api_objects_CodeSet.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4384a640a999cec3316ab96d1bb73a30bd723a25b1109262205772427c3a3bc4
description: Represents various industry defined codes in the context of their systems and versions of those systems. These codes are used in all sorts of digital records. This object is available in API version 50.0 and later.
---
# CodeSet

Represents various industry defined codes in the context of their systems and versions of those systems. These codes are used in all sorts of digital records. This object is available in API version 50.0 and later.

## Supported Calls

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

## Fields

### Code

- **Type**: string
- **Properties**: Create, Filter, Group, Sort, Update
- **Description**: The system-defined code that’s represented by this code set.

### CodeDescription

- **Type**: textarea
- **Properties**: Create, Nillable, Update
- **Description**: Additional information associated with the code set.

### CodeSetKey

- **Type**: string
- **Properties**: Create, Filter, Group, idLookup, Nillable, Sort, Update
- **Description**: Represents a unique key that identifies the concept represented by code sets across different systems and versions. This key isn’t case-sensitive.

### CodeSetType

- **Type**: picklist
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: Specifies the type of the code set.

### EndDate

- **Type**: date
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The end date of the code set’s effective period.

### IsActive

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether the code set is an active code set.

### IsCustomCode

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether the code set is defined by a specific organization, as opposed to recognized across the industry.

### IsPrimary

- **Type**: boolean
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: Indicates whether the code set is the primary code set for the concept. That is, it was selected manually by a user instead of being selected by an automated process.

### LastReferencedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The last date that the record was referenced.

### LastViewedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The last date that the record was viewed.

### Name

- **Type**: string
- **Properties**: Create, Filter, Group, idLookup, Sort, Update
- **Description**: The textual representation of the meaning of the code.

### OwnerId

- **Type**: reference
- **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update
- **Description**: A reference to the person who owns the code set record.

### SourceSystem

- **Type**: string
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The system that sets the context for the code and defines its meaning.

### StartDate

- **Type**: date
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The start date of the code set’s effective period.

### SystemVersion

- **Type**: string
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: The version of the source system the code belongs to.

## Usage

Code sets are used across multiple features and objects to represent coded, system-defined information about various entities. These codes are usually industry recognized codes from systems like LOINC or SNOMED.

## 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.

[CodeSetChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.life_sciences_dev_guide.meta/life_sciences_dev_guide/sforce_api_associated_objects_change_event.htm "A StandardObjectNameChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.") (API version 59.0)

Change events are available for the object.