Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Package.xml: CustomObjects with __mdt and __feed not filtering correctly #40

Open
fitzman49 opened this issue Aug 5, 2020 · 2 comments

Comments

@fitzman49
Copy link

Describe the bug
Specific object definitions ending in __mdt and __feed are not getting filtered correctly when running the package.xml filter command. They do not contain all the metadata from the original file which results in deployment failures using SFDX MDAPI commands. According to the documentation these types of files are supported by Salesforce and should be deployable: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_custom_objects_list.htm.

To Reproduce
Steps to reproduce the behavior:

  1. Define a CustomObject metadata type in package.xml that ends with __mdt or __feed. Ensure this CustomObject has custom fields created against it.
    <members>MyCustomObject__mdt</members> <type>CustomObject</type>
  2. Run the essentials:metadata:filter-from-packagexml command against that package.xml
  3. Observe that the custom fields are not present in the resulting file. It only contains a shell of what the object should look like.
  4. Deploying this out using SFDX MDAPI commands will result in a failure if other metadata defined in package.xml depend on these custom fields.

Expected behavior
Filtered sub-metadata (fields, listviews, etc) should be filtered correctly and included in the produced file similar to standard objects and custom objects ending in __c.

@fitzman49 fitzman49 changed the title Filter Package.xml: CusomObjects with __mdt and __feed not filtering correctly Filter Package.xml: CustomObjects with __mdt and __feed not filtering correctly Aug 5, 2020
@fitzman49
Copy link
Author

FYI I was able to work around this by defining the custom object and all custom fields for the new object. Not ideal but it works.

@nvuillam
Copy link
Owner

I don't have a lot of time to work on that these days... maybe you can submit a pull request ? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants