OpportunityLineItemSchedule

Represents information about the quantity, revenue distribution, and delivery dates for a particular OpportunityLineItem.

Supported Calls

create(), update(), delete(), query(), retrieve(), getDeleted(), getUpdated(), describeSObjects()

Fields

Field Field Type Field Properties Description
CurrencyIsoCode picklist CreateDefaulted on create

Filter

Nillable

Restricted picklist

Update

Available only for organizations with the multi-currency feature enabled. Contains the ISO code for any currency allowed by the organization. This field is available in version 10.0 and later.

Description string Create

Filter

Nillable

Update

Text description of the opportunity line item schedule. Limit: 255 characters. Label is Comments.
IsDeleted boolean Defaulted on create

Filter

Indicates whether the record has been moved to the Recycle Bin (true) or not (false). Label is Deleted.
OpportunityLineItemId reference Create

Filter

Required. ID of the associated OpportunityLineItem.
Quantity double Create

Filter

Nillable

Update

Required. The total number of units to be scheduled in a quantity schedule. See Allowed Quantity and Revenue Field Values for more information.
Revenue currency Create

Filter

Nillable

Update

The revenue that should be recognized, or the quantity that should be shipped, or both - depending upon the value of Type. See Allowed Quantity and Revenue Field Values for more information.
ScheduleDate date Create

Filter

Update

Required. The date the associated OpportunityLineItem is to be scheduled for an event: delivery, shipping, or any other date you wish to track.
Type picklist Create

Filter

Restricted picklist

Required. The type of the schedule. Required when inserting an OpportunityLineItemSchedule. Valid values include Quantity, Revenue, or Both. See Allowed Type Field Values for more information.

Allowed Type Field Values

The allowed Type values for an OpportunityLineItemSchedule depend on the product-level schedule preferences and whether the line item has any existing schedules. The following criteria must be met:
  • The Product2 on which the OpportunityLineItem is based must have the appropriate CanUseRevenueSchedule or CanUseQuantitySchedule fields (or both) set to true.
  • When you create() a schedule for a line item that does not have any existing schedules, you can specify any valid value.
  • If you create() a schedule for a line item that already has existing schedules, the new schedule must be consistent with the existing schedules. The following matrix outlines the allowable values:
Value of HasRevenueSchedule on line itemValue of HasQuantitySchedule on line itemAllowable Type Values
falsefalseRevenue, Quantity, both
falsetrueQuantity
truefalseRevenue
truetrueboth

Allowed Quantity and Revenue Field Values

The allowable Quantity and Revenue field values depend on the value of the Type field:

Type Value Allowable Quantity Value Allowable Revenue Value
Revenue Null Non-null
Quantity Non-null Null
both Non-null Non-null
The Quantity and Revenue fields have the following restrictions in the update() call:
  • For a schedule of Type “Quantity,” you cannot update a null Revenue value to non-null. Likewise for a schedule of Type “Revenue,” you cannot update a null Quantity value to non-null.
  • You cannot null out the Quantity field for a schedule of Type “Quantity.” Likewise you cannot null out the Revenue field for a schedule of Type “Revenue.”
  • You cannot null out either the Revenue or Quantity fields for a schedule of type “Both.”

Usage

Two types of OpportunityLineItemSchedules are supported:

The user must have edit access rights on the Opportunity in order to create() or update() line item schedules on that opportunity.

Products and Schedules Must Be Enabled

The OpportunityLineItemSchedule object is defined only for those organizations that have the products and schedules features enabled. If the organization does not have the products and schedules features, the OpportunityLineItemSchedule object does not appear in the describeGlobal() call, and you cannot use describeSObjects() or query() with the OpportunityLineItemSchedule object.

Effects on Opportunities and Opportunity Line Items

OpportunityLineItemSchedules affect opportunities and opportunity line items in the following ways:

Deleting an Opportunity Line Item Schedule

Deleting the last remaining schedule will set the corresponding HasQuantitySchedule or HasRevenueSchedule flags (or both) to false on the parent line item.

See Also:
OpportunityLineItem
Product2
delete()
© Copyright 2000-2008 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.