Skip to main content
How to deploy Custom links and buttons

Guidelines on how to retrieve and deploy Custom links and buttons via Custom object and WebLink metadata types

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

Custom links and custom buttons are stored as a WebLink metadata type in your Salesforce org, which is a subcomponent of Custom object.

If you wish to compare or deploy them, you need to ensure Custom object is included in your metadata filter.

How to compare WebLink metadata type?

You can choose to compare the entire Custom object with all of its subcomponents, or use the metadata filter to narrow down the retrieval to only include WebLink.

To narrow down your filter, on the Gearset Compare and deploy page open COMPARISON FILTER menu and select MANAGE CUSTOM FILTERS:

You can then customize your filter to retrieve only Custom object and WebLink types.

Then select OK and Compare now after you've selected both source and target environments.

How to filter a comparison for WebLink metadata type?

On the comparison results page you can quickly narrow down your results to only show your new or changed WebLink item by filtering the Metadata type column as shown below.

How to use advanced filtering options

Filtering comparison results by specific metadata type we're looking for is particularly useful when we have retrieved more metadata types in the comparison.

It helps with reducing the noise and hiding the components we're not currently interested in previewing. Example below:

Why is the WebLink metadata within comparison results showing 0 items?

There are scenarios in which is it an expected behavior for you to see the WebLink metadata type showing results as an image below when:


​1) There are WebLink metadata item(s) retrieved in the comparison, but the WebLink item shows as "No difference".
​2) Both the WebLink object and the Custom object (to which the WebLink item belongs) are New items in the source environment, and don't exist in the target.

Explanation

This is because the total count (on the menu on the left) of metadata items retrieved takes into consideration only New and Changed items. Items that show as "No difference" aren't added to the count.
​

Also, metadata sub-components that belong to metadata items which are new in the source aren't added to that count either.

Examples

Scenario 1
Below we're showing an example where the WebLink object shows as "No difference" in the comparison results. In such case, this is the best way to locate it:

Scenario 2

And an example where both Custom object + WebLink (that belongs to this object) are new in the source environment:

Did this answer your question?