Loading

Cannot deploy 'Field History Tracking' using a change set

Veröffentlichungsdatum: Oct 13, 2022
Beschreibung
It is not possible to enable Field History tracking in an org using a change set, but it is possible to enable this with Metadata API tools (ANT/ Visual Studio Code). 
Lösung
Although, it is not possible to enable Field History Tracking using Change Set deployments, however, you can use Metadata API tools (ANT/ Visual Studio Code) to accomplish the enabling Field History Tracking for the field. (<trackHistory>true</trackHistory>).
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <fields>
        <fullName>MyCustomAccountField__c</fullName>
        <description>A custom field on the Account standard object.</description>
        <externalId>false</externalId>
        <inlineHelpText>Some help text.</inlineHelpText>
        <label>MyCustomAccountField</label>
        <length>100</length>
        <required>false</required>
        <trackFeedHistory>false</trackFeedHistory>
        <trackHistory>true</trackHistory>
        <type>Text</type>
        <unique>false</unique>
    </fields>
</CustomObject>

For more information on deploying via the Metadata API please refer to the following docs:
Understanding the Metadata API
Metadata API CustomField - trackHistory
Nummer des Knowledge-Artikels

000384656

 
Laden
Salesforce Help | Article