You need to sign in to do that
Don't have an account?
Val Grasparil 4
Package.xml layouts issue
I am using metadata to deploy changes to my various environments. Since I have multiple BAs working in the same sandbox, they sometimes make field changes that do not need to be promoted to the other environments. In our package.xml, we are specifying every field in the CustomField section as opposed to doing a select all in the CustomObject. This provides a lot more granular control when we are merging to the different brances in our source control.
What I am noticing is that when i refresh my .object file, it is only grabbing the fields that are specified in my package.xml which I would expect. However, I notice that layouts seems to grab everything, including fields not specified in the package.xml. As you can imagine this causes issues because it now throws errors saying the CustomField does not exist.
Is this a defect in the metadata api? Or is there a workaround? Ideally i would not like to include some of these fields that potentially are POCs and not needed in Prod.
What I am noticing is that when i refresh my .object file, it is only grabbing the fields that are specified in my package.xml which I would expect. However, I notice that layouts seems to grab everything, including fields not specified in the package.xml. As you can imagine this causes issues because it now throws errors saying the CustomField does not exist.
Is this a defect in the metadata api? Or is there a workaround? Ideally i would not like to include some of these fields that potentially are POCs and not needed in Prod.
Whereas layouts are treated separetly they have their own metdata definition so salesforce retrieve the full layout configuration of what you have in your org. But when you port this layout to other org, if the fields are not present in the destination org you will encounter errors.
So as Ray mentioned if you need only the specific layout section then you need to modify the layout and retrieve it or else if you are comfortable with xml you can modify the generated layout xml file to remove the unwanted field tags and port it.
1. Remove the fields from the layout
2. Include these fields which may not be used in Prod in our package.xml so it does not throw errors
3. Add another lower level sandbox which our devs could merge into a feature branch