Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
ForecastingTypeSource
Parent Type
File Suffix and Directory Location
ForecastingTypeSource components have the suffix .forecastingTypeSource and are stored in the ForecastingTypeSources folder.
Version
ForecastingTypeSource components are available in API version 52.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| forecastingSourceDefinition | string | Required. ID of the forecasting source definition. |
| forecastingType | string | Required. ID of the forecast type. Can be linked only to forecast types created in Summer ’21 and later. |
| masterLabel | string | Required. Controlling label for this forecasting type source. |
| parentSourceDefinition | string | For forecast types not based on the Opportunity object and not based on a
custom measure, this value represents the parent ForecastingSourceDefinition of the
linked ForecastingSourceDefinition.
|
| relationField | string | Represents the field that links the source objects of the parent
ForecastingSourceDefinition to the child ForecastingSourceDefinition. Possible
values are:
|
| sourceGroup | int | Required. Represents a grouping of forecasting source definitions. |
Declarative Metadata Sample Definition
The following are two examples of a ForecastingTypeSource component. The first bases forecasts on the Opportunity Product object. The second bases forecasts on the Line Item Schedule object.
1<?xml version="1.0" encoding="UTF-8"?>
2<ForecastingTypeSource xmlns="http://soap.sforce.com/2006/04/metadata">
3 <forecastingSourceDefinition>FSD_OpportunityLineItem</forecastingSourceDefinition>
4 <forecastingType>d</forecastingType>
5 <masterLabel>ForecastingTypeSource_d7</masterLabel>
6 <parentSourceDefinition>FSD_OpportunityLineItemSchedule1</parentSourceDefinition>
7 <relationField>OpportunityLineItemSchedule.OpportunityLineItemId</relationField>
8 <sourceGroup>1</sourceGroup>
9</ForecastingTypeSource>1<?xml version="1.0" encoding="UTF-8"?>
2<ForecastingTypeSource xmlns="http://soap.sforce.com/2006/04/metadata">
3<forecastingSourceDefinition>FSDOpportunityLineItemSchedule</forecastingSourceDefinition>
4 <forecastingType>c3</forecastingType>
5 <masterLabel>ForecastingTypeSource_c37syR</masterLabel>
6 <sourceGroup>1</sourceGroup>
7</ForecastingTypeSource>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>*</members>
5 <name>ForecastingTypeSource</name>
6 </types>
7 <version>52.0</version>
8</Package>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.