0

I've added this to my package.xml so I get the Account Standard Object metadata and the AMR__c Custom Object metadata:

<types>
    <members>AMR__c</members>
    <members>Account</members>
    <name>CustomObject</name>
</types>

I found this brought down ALL the List Views for both objects.

My Users update these List Views regularly directly in Production so I therefore don't want to track them in git as it raises differences between Sandbox and Prod all the time.

Is there a way to only pull down specific List Views in the Standard/Custom Object metadata?

I've tried adding this to my package.xml:

<types>
    <members>AMR__c.Amber_s_MPANs</members>
    <name>ListView</name>
</types>
<types>
    <members>Account.AllBrokers</members>
    <name>ListView</name>
</types>

With the hope it would then only bring these down but in effect adding these into the package.xml makes no difference - all the List Views are still pulled down into both objects.

1 Answer 1

1

If you specify CustomObject, you'll get all the list views for that object. The package manifest is "additive", meaning that things can be added, but cannot be taken away. The only way to avoid getting more than you want would be to retrieve less than you probably need.

Possible solutions include using DX (this would break the list views out in to a friendly format you could use), using ListView directly without the CustomObject (won't retrieve other CustomObject settings, either...), writing an ant script to filter out the unwanted views, etc.

2
  • Ah ok thank you! DX isn't an option for this project at this moment in time and yes removing the CustomObject altogether won't work either as I need the other metadata for it. The only solution is to write a script to remove the ListView metadata I think.
    – Force Hero
    Commented Jun 25, 2018 at 12:13
  • @ForceHero Yeah, using DX would simplify the problem considerably. You'll still download junk you won't need, but at least it would be trivial to clean up then.
    – sfdcfox
    Commented Jun 25, 2018 at 12:15

You must log in to answer this question.

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