My Managed Package app is using Topics for a packaged Custom Object. I just learned that Topics can not be packaged and therefore even a force:metadata:deploy from scratch to packaging org fails.

How can I have the TopicsForObjects metatdata in my versions control and use it in my scratch orgs but make sure it doesn't get deployed into the packaging org?

I tried with adding it .forceignore is not right because it will not even pull it out my scratch org. And I would like to have it in my VCS. In the Falcon SFDX template I have seen a seperate unpackaged folder. Is that the recommended approach to go?

1 Answer 1


Create a separate package folder called "unpackageable" that's in the same force-app folder but not part of the package that you'll be publishing. Put your topicsForObjects metadata in there. It will be pushed to the scratch org but not included in your package

  • 1
    That was easy. You are right. Just point the deployToPackaging script to force-app/main and keep the to ignore metadata in force-app/unpackaged. I though I would need to work with a customized package.xml ;-) Apr 9, 2020 at 8:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .