Skip to content

Add option to force:source:retrieve to exclude Managed Package's components #87

Closed

Description

@maaaaarco

I'd like to have an option on the force:source:retrieve command that allows me to include/excludes Managed Pakage's components automatically. For example, in case I installed a Managed Package that adds some fields on the Account object, when running this command
sfdx force:source:retrieve -m CustomObject:Account
I'll also retrieve all the fields created by the Managed Package.

Describe the solution you'd like
An option that could look like this:
sfdx force:source:retrieve -m CustomObject:Account --exclude-managed-components
In this case all the fields that are part of a Managed Package won't be retrieved.

Activity

  1. clairebianchi commented on May 21, 2019

    @clairebianchi
    Contributor

    @maaaaarco do you want this to work as a blanket exclusion of all managed package components or can you forsee ever wanting to pick and choose components to exclude?

  2. maaaaarco commented on May 22, 2019

    @maaaaarco
    Author

    Mmmmm no at the moment I cannot forsee any reason why I might want to retrieve only some Managed components. In that case I might configure which components to exclude and which to include inside my .forceignore file.

  3. ralphcallaway commented on Apr 17, 2020

    @ralphcallaway

    the inverse of this might also be considered, currently if you retrieve all custom objects, i'd expect get unmanaged fields on managed objects, but i get nothing

    seems like the default behavior should be

    • don't retrieve managed metadata (listviews, customfields, buttons, etc.) that's part of unmanaged metadata (mainly custom objects)
    • retrieve unmanaged metadata (listviews, custom fields, etc.) that are part of managed metadata (mainly custom object)

    right now you get managed metadata you don't want, and you don't get unmanaged metadata you would, makes CI difficult due to errors about not being able to modify managed metadata, or having to manually specify unmanaged metadata

  4. adrien-gunes commented on May 17, 2021

    @adrien-gunes

    This would be very helpful for my initial migrations... Just retrieve what is not managed package (this is already installed in source and target), fetch just the delta, and deploy this into the target environment. Would make my life so much easier.

  5. goto-dev-null commented on Jun 14, 2021

    @goto-dev-null

    This is so incredibly crucial. Why would I want to check managed elements into my source control? All it does is cause deployment errors and I'm having to write scripting to clean specific XML files matching name patterns when Salesforce already knows what's managed or not.

    Honestly, this should exclude all packaged components including unmanaged packages. Same deal for managed only even more reasoning: packages are meant to be using push and pull so the ability to exclude them has to be present (if not the default).

  6. locked and limited conversation to collaborators on Aug 1, 2023
  7. converted this issue into a discussion #2360 on Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIssue or pull request for a new feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions