Skip to main content

How to deploy ForecastingType metadata

A walkthrough on how to deploy ForecastingType metadata

Richard Terry avatar
Written by Richard Terry
Updated this week

Forecasting settings are a tricky metadata type as to successfully deploy them, four separate metadata types are required.

Prerequisites

Make sure that in both your source and target, forecasts are enabled.

What metadata is needed in the filter?

In your metadata filter you will need to include Forecasting source definition, Forecasting type , Forecasting type source and Settings.

How to deploy through Gearset

In this example, I have the forecast type Gearset Deployment

Once I have run the comparison with the selected metadata above, I'll need to select Forecasting settings, the related Forecasting source definition, Forecasting type and Forecasting type source

Note: To ensure you are selecting the correct Forecasting source definition. Go into the Forecasting type source and read the XML in the XML viewer.

Salesforce Validation Error: Value too long for field: Forecasting Group maximum length is:15

When you create a ForecastingGroup in Salesforce by assigning a picklist as a grouping for a ForecastingType, its name is automatically generated.

The formula for this name is:
​[Picklist Developer Name (without __c)] + _ + [ForecastingType Developer Name]

For example, if your picklist developer name is MyPicklistName__c and your ForecastingType developer name is MyForecastingType, the resulting ForecastingGroup name will be MyPicklistName_MyForecastingType.

Deployment Limitation

The developer name of a ForecastingGroup is stored as a field on the ForecastingType object and has a character limit of 15. This means the combined length of your picklist's developer name (excluding __c), an underscore, and the ForecastingType's developer name must not exceed 15 characters. If it does, deployments to other Salesforce orgs using the metadata API will fail with a validation error.

If you have any more questions on how to deploy this or anymore metadata types then please reach out in the app chat!

Did this answer your question?