function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matthew WeissMatthew Weiss 

sfdx set tracking history

 

 

Where in the dx application can I set tracking history for some standard objects?    

Best Answer chosen by Matthew Weiss
Matthew WeissMatthew Weiss
Found the issue/answer.

https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F93A000000HTp1&fId=0D53A00003HwzOt

All Answers

Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Mattew,


You can enable field history tracking for standard objects in the object’s management settings. hope it helps.

Please mark it as best answer if the information is informative.

Thanks
Rahul Kumar
Matthew WeissMatthew Weiss

Rahul, 

That does not help... I can do that in my scratch org and after I make those changes they deploy.  I need to have it automated.  To make a package (second gen) you need to have all the configs figured out within the package itself.   

 

I need to have a way to enable set tracking history, within my sfdx project. 

Matthew WeissMatthew Weiss
Found the issue/answer.

https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F93A000000HTp1&fId=0D53A00003HwzOt
This was selected as the best answer
Jef SouzaJef Souza
I have ran into this issue as well. It doesn't matter what <enableHistory> is set to at the object level. It will not push that to a new ScratchOrg. If you have any fields with <trackHistory> set to true you'll get an error that history tracking is not enabled at the object =\.

I have had to remove the trackHistory from the field level in the hopes that when I do a metadata api push that it'll leave the value alone in the target environment.

I contacted SF support and got them to create this issue for me if you'd like to vote:
https://success.salesforce.com/issues_view?id=a1p3A0000018BX2QAM

Thanks!
David Jordan 20David Jordan 20
I'm also having the same issue. I'd love to get SFDX working but we have a reasonably complex org with history tracking enabled on lots of objects. The workaround of manually enabling history tracking defeats the whole power of scripted CLI and continuous integration with scratch orgs and IMHO makes SFDX nothing more than a curiosity at the moment.