Newer Version Available
ForecastingSourceDefinition
Parent Type
This type extends the Metadata metadata type and inherits its
fullName field.
File Suffix and Directory Location
ForecastingSourceDefinition components have the suffix .forecastingSourceDefinition and are stored in the forecastingSourceDefinitions folder.
Version
ForecastingSourceDefinition components are available in API version 52.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| categoryField | string | Name of the forecast category that is associated with the forecast type.
Possible values are:
|
| dateField | string | Field that is used for the forecast type’s date type. For example, the
CloseDate field on Opportunity is used for opportunity close
date-based forecast types. Possible values are:
|
| familyField | string | Use this field to group forecasts by product family. Possible values are:
|
| masterLabel | string | Required. Controlling label for this forecasting source definition. |
| measureField | string | Field that is used for the forecast type’s measure. For example, the
Amount field on Opportunity is associated with revenue-based
forecast types. Possible values are*:
|
| sourceObject | string | Required. Object associated with this forecasting source definition. Possible
values are:
|
| territory2Field | string | For a territory-based forecast type, indicates the field that is used for
territory information. Possible values are:
For user role-based forecast types, this value is null. |
| userField | string | Specifies who owns the forecast. Possible values are:
|
Declarative Metadata Sample Definition
The following is an example of a ForecastingSourceDefinition component.
The following is an example package.xml that references the previous definition.
Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.
Usage
- Forecast types that were available before API version 52.0 can be activated, deactivated, and deleted but not created. To enable an existing forecast type, update the active flag.
- Forecast types that are available only in API version 52.0 and later can be created, activated, deactivated, and deleted. If the forecast type doesn’t exist, it is created in the inactive state. If the forecast type exists, the active flag is updated. Deploy the zip file twice to create and activate the forecast type.
- Deploy Metadata API types in the following sequence: ForecastingSettings, ForecastingType, ForecastingSourceDefinition, and then ForecastingTypeSource. If all are specified in the package file, the sequence is followed automatically.