---
schema_version: "1"
id: f1ef9da8f7231e0ff98dcc752d878951ce01bfeabd5cc49a0338888d4fb618a8
title: AttributeDefinition
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_attributedefinition.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_attributedefinition.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3a1128919f5a14d71c1ad231cf4f809dd1beea389dea34de74b67be6ae82c82f
description: Represents a product, asset, or object attribute, for example, a hardward specification or software detail. This object is available in API version 57.0 and later.
---
# AttributeDefinition

Represents a product, asset, or object attribute, for example, a hardward specification or software detail. This object is available in API version 57.0 and later.

## Supported Calls

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

## Special Access Rules

Field Service must be enabled.

## Fields

| Field | Details |
| --- | --- |
| DataType | 
Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort, Update

Description

The data type of the attribute definition.

Possible values are:

- Checkbox
- Date
- Datetime
- Number
- Picklist
- Text





 |
| DefaultValue | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The default value for this attribute.



 |
| Description | 

Type

textarea

Properties

Create, Nillable, Update

Description

Description of this attribute.



 |
| DeveloperName | 

Type

string

Properties

Create, Filter, Group, Sort

Description

The unique name of the attribute definition record.

This name must begin with a letter and use only alphanumeric characters and underscores. It can't include spaces, end with an underscore, or have two consecutive underscores.

The developer name is used for internal purpose and must be unique for all records (including deleted records). If the system doesn't find the name unique, it automatically overrides the user input and creates a unique name. For external use, the developer name need not be fixed.



 |
| IsActive | 

Type

boolean

Properties

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

Description

Indicates that the attribute definition is active. Active attributes definitions can be selected for assets.

The default value is false.



 |
| IsRequired | 

Type

boolean

Properties

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

Description

Indicates whether the attribute definition is required for an asset.

The default value is false.



 |
| Label | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

The label for the attribute. Displays a friendly name for the attribute, for example, [threshold monitor lightning component and recordset filter criteria rule](https://help.salesforce.com/s/articleView?id=service.fs_asset_attrib_manage_monit_filter.htm&type=5&language=en_US).



 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date the attribute definition was last referenced.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date the attribute definition was last viewed.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, idLookup, Sort, Update

Description

The name of the attribute.



 |
| OwnerId | 

Type

reference

Properties

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

Description

The owner of the attribute definition.

This field is a polymorphic relationship field.

Relationship Name

Owner

Relationship Type

Lookup

Refers To

Group, User



 |
| PicklistId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The ID of the attribute picklist with the valid values for this attribute.

This field is a relationship field.

Relationship Name

Picklist

Relationship Type

Lookup

Refers To

AttributePicklist



 |
| SourceSystemIdentifier | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The identifier of the attribute definition in an external system.



 |
| UnitOfMeasureId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The ID of the measurement unit for this attribute.

This field is a relationship field.

Relationship Name

UnitOfMeasure

Relationship Type

Lookup

Refers To

UnitOfMeasure



 |

## Usage

Add asset descriptors to the Asset object instead of creating multiple custom attributes on an asset. This helps scale to a high volume of various assets in the system. When you create the AttributeDefinition, you can provide a unique API name. If the API name is not unique, the system appends a number to the end of the API name. The value of this number depends on how many times the same name has been used.

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

[AttributeDefinitionChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm "HTML (New Window)") (API version 62.0)

Change events are available for the object.

[AttributeDefinitionHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_history.htm "StandardObjectNameHistory is the model for all history objects associated with standard objects. These objects represent the history of changes to the values in the fields of a standard object.")

History is available for tracked fields of the object.

[AttributeDefinitionOwnerSharingRule](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.

[AttributeDefinitionShare](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.

#### See Also

- [AssetAttribute](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_assetattribute.htm "Stores asset attributes to track and analyze asset conditions to improve their uptime. This object is available in API version 57.0 and later.")
- [AttributePicklist](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_attributepicklist.htm "Represents a custom picklist for an asset attribute. This object is available in API version 57.0 and later.")
- [AttributePicklistValue](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_attributepicklistvalue.htm "Represents the values of an asset attribute picklist. This object is available in API version 57.0 and later.")
- [RecordsetFltrCritMonitor](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_recordsetfltrcritmonitor.htm "Monitors whether the value of an asset attribute is within the threshold of a recordset filter criteria (RFC). You can monitor one or more RFCs for an Asset. This object is available in API version 57.0 and later.")