---
schema_version: "1"
id: 1928774ae5367d585275590bff6ac60e952d47cbc9a5ce274e050b1ba47c0951
title: CodeSet
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/mfg_api_devguide/sforce_api_objects_codeset.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.mfg_api_devguide.meta/mfg_api_devguide/sforce_api_objects_codeset.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 83e1ba4e74c7613bf268b0ba70e7fde7e880a6605be25d07a0bcf90d6f887bed
description: Represents various industry defined codes in the context of their systems and versions of those systems. This object is available in Manufacturing Cloud in API version 58.0 and later.
---
# CodeSet

Represents various industry defined codes in the context of their systems and versions of those systems. This object is available in Manufacturing Cloud in API version 58.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**: A unique key that identifies the concept represented by code sets across different systems and versions. This key is not case sensitive.

### CodeSetType

- **Type**: picklist
- **Properties**: Create, Filter, Group, Nillable, Sort, Update
- **Description**: 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 (true) or not (false).
- **Default value**: false

### 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.
- **Default value**: false

### 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 (true) or not (false). That is, it was selected manually by a user instead of being selected by an automated process.
- **Default value**: false

### LastReferencedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The timestamp for when the current user last viewed a record related to this record.

### LastViewedDate

- **Type**: dateTime
- **Properties**: Filter, Nillable, Sort
- **Description**: The timestamp for when the current user last viewed this record. If this value is null, it’s possible that this record was referenced (LastReferencedDate) and not 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.
    
    This field is a polymorphic relationship field.
- **Relationship Name**: Owner
- **Relationship Type**: Lookup
- **Refers To**: Group, User

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