Newer Version Available
LineitemOverride Object Lifecycle
Additional rules apply to line item overrides, as explained in the rest of this section.
Creating Line Item Overrides
The full set of LineitemOverride records for each OpportunityOverride record is always created to mirror the line item records that exist for the Opportunity record. Whether a user makes an override at the opportunity level or line item level, or even just edits Forecast Category on the Opportunity Edit (only opportunity owners can do this), the end result is the same in terms of the Opportunity and LineitemOverride records that are created.
Updating Line Item Overrides
All information from Updating Opportunity Values and Opportunity Override Values applies to updating LineitemOverride records, with the following changes.
- Forecast Category overrides at the opportunity level are cascaded down into child LineitemOverride records, if the Forecast Category has not been overridden for a particular line item by that user or a subordinate user. That is, when a user establishes an opportunity-level Forecast Category override, any line item-level Forecast Category overrides by a subordinate forecast manager will take precedence when updating line item Forecast Category values for this user and any superiors. The converse is not true. Forecast Category on an OpportunityOverride record is never updated in response to a Forecast Category override on a LineitemOverride record by any user. When a user sets a Forecast Category override at the line item level, the override value is written to the LineitemOverride records of the user who set the override and other forecast managers above that user in the forecast hierarchy, until an existing override value is reached.
- Opportunity line item values for Unit Price, Total Price and Quantity, if changed, are saved on the LineitemOverride records for the opportunity owner and above in the forecast hierarchy, until the first overriden value is encountered for the field. Quantity can only be overridden in the Salesforce user interface if Quantity Forecasting is enabled on the Forecast Settings page. Unit Price and Total Price can only be overridden if Revenue Forecasting is enabled.
When Quantity or Unit Price are overridden, the Total Price is computed and written to the relevant LineitemOverride record. When Total Price is overridden, but not Unit Price, the Unit Price is computed and written to the relevant LineitemOverride records. If both are overridden, no computation occurs. The computation applies to the LineitemOverride record that contains the override value and related LineitemOverride records that inherit the overridden value. That is, for a given LineitemOverride record, we compute Total Price or Unit Price according to the above rules, if an override is made on the current record or if the record inherited an override made by a subordinate forecast manager.
If you selected the value Schedule Date in Forecasts Settings, you can’t override the following values.
- If forecasting by Revenue, or Revenue and Quantity, and the OpportunityLineItem record has a Revenue schedule, you cannot override Unit Price and Total Price.
- If forecasting by Quantity, or Revenue and Quantity, and the OpportunityLineItem records have Quantity schedules, you cannot override Quantity.
Deleting Line Item Overrides
Whenever a line item is deleted, LineitemOverride records relating to that line item are deleted for all users, similar to opportunities. Also, opportunity transfers and forecast hierarchy changes affect line item overrides the same way they affect opportunity overrides. That is, if an OpportunityOverride record is deleted, all the child LineitemOverride records, matching on OpportunityId and OwnerId, are also deleted.