You need to sign in to do that
Don't have an account?
David Pattison
Can unlocked packages include standard fields?
Hi all,
I tried to add some Case Standard fields into my unlocked package, merely to enable history tracking on the fields. For example, the Type and Description field. I got no errors creating the package. However, installing the package didn't seem to enable the history tracking. Is this even supported?
I tried to add some Case Standard fields into my unlocked package, merely to enable history tracking on the fields. For example, the Type and Description field. I got no errors creating the package. However, installing the package didn't seem to enable the history tracking. Is this even supported?
I have checked internally and learned from our Senior Director, Product Management that Standard fields cannot be packaged in unlocked packages
I haven't been able to find this documented anywhere myself but I suggest raising an Idea on the IdeaExhchange platform
If you find this information helpful, I appreciate it if you can mark this answer as Best so that others facing the same issue might find this useful
All Answers
The metadata coverage report is the source of truth for metadata supported in unlocked packages. While the vision is to provide metadata API support for all Salesforce Metadata and enable everything to be packaged in an unlocked package, it is going to take a while to get there, and the metadata coverage report will track the progress. Having said this, singletons (things that have only one instance of them in an org) like org settings and preferences, and metadata without top-level ids (E.g.: Standard Value Sets) are NOT packageable in unlocked packages.
There have been known Issues around this particularly to show a warning message when an attempt is made to include such fields
https://trailblazer.salesforce.com/issues_view?Id=a1p3A000001SHEU
package:install does NOT enable history tracking on Contact object, nor on a Custom Field. The above-known issue describes that
Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you
I have checked internally and learned from our Senior Director, Product Management that Standard fields cannot be packaged in unlocked packages
I haven't been able to find this documented anywhere myself but I suggest raising an Idea on the IdeaExhchange platform
If you find this information helpful, I appreciate it if you can mark this answer as Best so that others facing the same issue might find this useful