---
schema_version: "1"
id: ce08546a6402690d1603b6a47779637e9da451be7ac598f12f4a05fcdf1cca62
title: UserDefinedLabel
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_userdefinedlabel.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userdefinedlabel.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5b86fe87c3d4b97f5be012581c1738c139967cb44814aab18436270db286c3ef
description: Represents a label created by a user to help organize, track, and find records. This object is available in API version 61.0 and later.
---
# UserDefinedLabel

Represents a label created by a user to help organize, track, and find records. This object is available in API version 61.0 and later.

## Supported Calls

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

## Fields

| Field | Details |
| --- | --- |
| Color | 
Type

string

Properties

Create, Filter, Group, Sort, Update

Description

Hexadecimal value of the color used to help organize the UserDefinedLabel records.



 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp when the current user last accessed this record indirectly. For example, accessed through a list view or related record.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp when the current user last viewed this record or list view. If this value is null, and LastReferenceDate is not null, the user accessed this record or list view indirectly. For example, accessed through a list view or related record.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, idLookup, Sort, Update

Description

Name of the UserDefinedLabel record.



 |
| OwnerId | 

Type

reference

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

ID of the user or group that owns the label.

This field is a polymorphic relationship field.

Relationship Name

Owner

Refers To

Group, User



 |
| TotalAssignments | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

Calculated field. Number of related UserDefinedLabelAssignment records. Available in API version 62.0 and later.



 |
| Type | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort

Description

Type of user-defined label.

Possible values are:

- Starred
- Tag
- User





 |

## Associated Objects

This object has these 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.

[UserDefinedLabelOwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_ownersharingrule.htm "StandardObjectNameOwnerSharingRule is the model for all owner sharing rule objects associated with standard objects. These objects represent a rule for sharing a standard object with users other than the owner.")

Sharing rules are available for the object.

[UserDefinedLabelShare](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/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.