Skip to main content
How to deploy Public Group metadata

Guidance on how to retrieve and deploy Public Group metadata using Group metadata type

Mateusz Kochanowicz avatar
Written by Mateusz Kochanowicz
Updated over a week ago

What metadata type to select in the filter?

Public Groups are stored in the Group metadata type.
โ€‹
So in order to deploy a Public Group, you'd need to include Group metadata type in your metadata filter, which should look like like this:

You can also use Gearset's Default comparison metadata filter, which already includes the Group metadata type.

How do Public Groups look in the comparison results?

Below is an example of a Public Group found in the comparison results when Group metadata type is selected.

Where to find this change in the Salesforce org?

For extra context, in this Salesforce org the group's location is in Users > Public Groups.

Is it possible to retrieve users assigned to a Public Group?

For example, in this org an assigned use looks like this:

If this is the type of change you're looking to deploy between environments, we found out that Group metadata type won't retrieve users assigned to a specific Public Group.

This is because users are treated as data, not metadata. Therefore, the metadata API won't support it's retrieval. Which means that you would have to add this manually as a post-deployment step.
โ€‹

Did this answer your question?