1

In our Salesforce implementation we installed several managed packages. We have also set up a CI process using jenkins+git to allow us to quickly deploy our changes to the next environment.

Recently we are having problems with some fields coming from those managed packages. They are present in objects, profiles, etc... and if they don't exist in the target sandboxes, or are slightly different (new version) we get deployment errors.

The question I have is : is it possible to exclude metadata from managed package from our project and from git? In an IDE can we retrieve metadata without managed package fields/objects/etc?

Thank you.

1

The best time to filter managed packages is at the point you retrieve them from SFDC - it's really tricky to filter them out when cloning / pulling from the git repo, so your best bet is to do a metadata retrieve that excludes packages and push that change to a branch in git.

...there is a caveat though. Running a retrieve against SFDC without including managed packages won't completely exclude every managed package reference. There won't be any wholesale managed objects, but any managed fields that it adds to standard objects will be retrieved. There's no easy solution to this, other than to make sure that the installed package versions are kept up to date between environments, I'm afraid.

Third party tools can help - for some context, I work on Gearset, and we've written a problem analyzer that solves this problem by checking whether any fields (...action overrides, weblinks, etc.) belong to a managed package namespace and automatically excluding them from the git commit / SFDC deployment if that managed package isn't explicitly included in the comparison / commit / deployment. You could roll a script that checks for managed fields on standard objects and strips them as part of your CI process, perhaps?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.