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.
Create Components for Forecast Pages
To add a custom template to a Lightning forecasts page, implement the lightning:forecastingTemplate interface.
To allow the component access to a Lightning forecasts page, implement the lightning:availableForForecastingPage interface.
Upon initialization, the component attempts to populate the following attributes to provide some forecast context. The attributes include:
-
contextPeriodIds—The time period IDs from the
user context.
1<aura:attribute name="contextPeriodIds" type="String[]" /> -
currencyIsoCode—The ISO code of the unit of
currency that the user views.
1<aura:attribute name="currencyIsoCode" type="String" /> -
forecastingOwnerId—The forecast owner's user ID.
1<aura:attribute name="forecastingOwnerId" type="String" /> -
forecastingTerritoryId—The forecast
territory's ID.
1<aura:attribute name="forecastingTerritoryId" type="String" /> -
forecastingTypeId—The user’s selected forecast type.
1<aura:attribute name="forecastingTypeId" type="String" /> -
scope—The supported scope type. If scope is undefined or null, a single territory or role page
is loaded.
1<aura:attribute name="scope" type="String" />1SupportedScopeType : {'my_territory'}
Lightning forecasts pages don’t support any standard or custom events published from custom components.
When the Lightning forecasts page changes, such as owner or forecast type, the page header publishes a Lightning message. You can subscribe to the lightning__forecasting_flexipageUpdated LightningMessageChannel to update your custom components based on Lightning forecasts page header changes.