The metadata grid is a compilation of all the metadata components available in a Salesforce org displayed as rows. Each row in the grid represents a metadata component.
When committing changes to a user story, Copado displays a metadata grid with all the components included in the org linked to that user story through the credential. This metadata grid allows you to effortlessly find and select the components you want to commit, thus making the commit process much simpler.
Elements in the Metadata Grid
Let’s take a look at the different columns and elements you can find in the metadata grid:
- All Metadata: This tab will display all the components available, whether they have been selected or not.
- Selected Metadata: This tab only displays the metadata components you have selected.
- Selected: Mark the Selected checkbox to select a component you want to commit and later deploy.
- Retrieve Only: This checkbox can be used to provide incremental permissions, such as field level security, object level security, or tab visibility, for instance, to profiles and permission sets. Components marked as Retrieve Only will not be committed or deployed.
- Name: This column includes the API name of the components in the metadata grid.
- Type: This column includes the different metadata types of the components. By default, all metadata types are selected, however, you can deselect them all and just select specific metadata types you are interested in to make your search easier.
- Last Modified By ID: This column displays the name of the users who have last modified a component and can be sorted in ascending or descending order.
- Last Modified Date: Here you can see the date a component was last modified. You can sort this column in ascending or descending order.
- Created By: This column shows the name of the user who set up the org with the components or created a particular component.
- Created Date: Here you can see the date the component was created.
- Select All: By clicking on this button, all the components in the metadata grid will be selected.
- Unselect All: By clicking on his button, all the components you have selected in the metadata grid will be unchecked.
- In the bottom right corner of the grid, you will find a few options to easily navigate through all the components in the org. You can input the number of the page you want to navigate to in the Go to page box, change the number of rows to be displayed in the Show rows drop-down menu or display the next or previous rows by clicking on the forward and back arrows.
- Refresh All Metadata: When clicking on this button, a full refresh of the metadata’s source org is executed. The twisted arrow used to refresh the grid has been replaced with this button.
- Refresh Recent Changes: By clicking this button, all the components modified in the source org of the user story since the last credential refresh date will be retrieved. Also, this type of refresh will be done automatically when loading the page.
Please review the Limitations and Considerations of Refreshing Recent Changes Metadata section.
- Auto-Select Changes: Automatically selects in the grid all modified components based on the option selected from the drop-down list:
- Done Today: Automatically select the grid components whose last modified date is today.
- Done Since Yesterday: Automatically select the grid components whose last modified date is greater than or equal to yesterday.
- Done Since Last Commit Date: The behavior will depend on the following scenarios:
- There are commits in the user story: Copado will automatically select the grid components whose last modified date is greater than or equal to the last valid commit in the user story.
- There are no commits in the user story (first commit about to happen): Copado will automatically select the grid components whose last modified date is greater than or equal to the last valid commit by the credential in the source environment of the user story.
- There are no commits in the user story or the related credential: Nothing is selected and the following error message is displayed: "There is nothing to select at the moment. There should be at least one commit present in the User Story or in the related Credential".
- Get Vlocity Dependencies: If you would like to resolve Vlocity dependencies before a commit, you can select the components you want to commit and then click on Get Vlocity Dependencies. After completion of the job, you will see in the Selected Metadata tab your original selections plus the dependencies needed, so that you can commit and deploy them together.You see the Get Vlocity Dependencies button only when you commit from user stories but not when you commit from the Git snapshot records.The selected components are those where the user in the Last Modified by ID column of the metadata grid matches the logged-in user's full name (first and last name).For more information about this feature, please review the Limitations and Considerations of Auto-Select Changes section.
Filtering Options in the Metadata Grid
The metadata grid offers different filtering options and features to make the selection much easier:
- There is a drop-down option that allows you to change the filtering method in the Name, Created By and Last Modified By columns:
- You can filter the Last Modified Date column by date to just display the components that were modified on a specific date:
- When you manually type the name of a metadata component in the Type column, this component is highlighted in the drop-down menu:
The metadata grid on the User Story Commit, Git Snapshot Commit, and DX Commit pages automatically displays to its fullest length based on the screen resolution. The expand button has been removed from the metadata grid.
Limitations and Considerations of Refreshing Recent Changes Metadata
This button retrieves the new or modified components in the source org since the last credential refresh. This makes the grid load faster as it is a partial refresh. There are some limitations to take into consideration when attempting to use this feature:
- This button is only available when the source org is a Scratch Org, Developer or Developer Pro sandbox, and when source tracking is enabled in the production org. To enable it:
- Go to Setup --> Dev Hub → Select Enable Source Tracking in Developer and Developer Pro Sandboxes.
- Refresh the sandbox after enabling this feature.
- It is not available in:
- Type Filtered Metadata grid
- Add Metadata page
- Vlocity components
- There are some metadata types not supported by this functionality, for example, SharingRules or ManagedContentType. In this case, you need to use the Refresh All Metadata button. For more information about unsupported metadata types in source tracking, check out the Salesforce Metadata Coverage report.
- When creating a Scratch Org with Copado DX and then using it as a credential in a User Story:
- An error message will be displayed in red on the commit page. You will be able to commit changes and use the Refresh All Metadata button, but not the Refresh Recent Changes button.
If there's an ongoing metadata refresh meaning that the metadata attachment is being created either because credentials filter where updated or because a full refresh was started, the Refresh Recent Changes button will be disabled until that operation finishes and the following message will be displayed: "The Credential does not have a child "MetaData" attachment or an "All Metadata" refresh is in progress. Check your Credential for more information"
Limitations and Considerations of Auto-Select Changes
Components Not Supported For the Auto-select Changes Feature
- There are components that don't have a last modified date provided by the Metadata API. Therefore, they will not be automatically selected by the auto-select changes button. Here are some examples of these type of components:
- Custom Tab
- Standard Value Set
- Salesforce standard Custom Objects (like Opportunity) and Custom Fields (like Account.AnnualRevenue).
- Vlocity Components are also not supported by auto-select changes since the LastModifiedDate is not provided in these.
- The grid must be refreshed before using this feature so that auto-select changes are based on the most recent changes.
- Special characters, like accents, are normalized when matching user full names.
- This button is available for all the supported Git operations.
- The components that are selected are those in which the user from the Last Modified By ID column of the metadata grid is equal to the logged-in user's full name (first name + last name). In the credential, the metadata attachment contains the full name of the user and this is the one shown in the Last Modified By ID column, so Copado matches the metadata attachment with the full name of the user committing changes.