Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Icon

Represents the mapping of custom icons to objects.This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

Icon components have the suffix .icon and are stored in the icons folder.

Version

Icon components are available in API version 49.0 and later.

Special Access Rules

To use this metadata type, your Salesforce org must have the Health Cloud or Agentforce Financial Services license.

Fields

Field Name Field Type Description
image string Required. The image file that is mapped to the object.

Use the ContentAsset metadata type to hold the icon image referenced in the image field.

key string Required. A field value in the object. For example, with the PersonLifeEventobject, possible values for key can be birthday, marriage, childbirth, and so on.
usageType IconUsageType (enumeration of type string) Required. The object that is mapped to the image. Valid values are:
  • PersonLifeEvent
  • InsurancePolicy
  • BusinessMilestone
  • AssetMilestone
  • FinancialAccountMilestone

Declarative Metadata Sample Definition

The following is an example of an Icon component.

1<?xml version="1.0" encoding="UTF-8"?>
2<Icon xmlns="http://soap.sforce.com/2006/04/metadata">
3    <usageType>PersonLifeEvent</usageType>
4    <key>Birth</key>
5    <image>image</image>
6</Icon>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>icons</members>
5        <name>Icon</name>
6    </types>
7    <version>49.0</version>
8</Package>