Newer Version Available

This content describes an older version of this product. View Latest

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

AttributeDefinitionHistory
History is available for tracked fields of the object.
AttributeDefinitionOwnerSharingRule
Sharing rules are available for the object.
AttributeDefinitionShare
Sharing is available for the object.