PricebookEntry
Represents a product entry (an association between a Pricebook2 and Product2) in a price book.
Introduced in API version 3.0.
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), update(), upsert()
- Type: int
- Properties: Filter, Group, Nillable, Sort
- Introduced: API version 49.0
- Description: The count of active price adjustment schedules associated with the price book entry. This field is available with a B2B or D2C Commerce license.
- Type: int
- Properties: Create, Filter, Group, Sort
- Type: boolean
- Properties: Create, Defaulted on create, Filter, Group, Sort, Update
- Description: Indicates whether this price book entry is active (
true) or not (false). Although you can never delete PricebookEntry records, your client application can set this flag tofalse. Inactive PricebookEntry records are hidden in many areas in the user interface. You can change this flag on a PricebookEntry record as often as necessary. - Default value: false
- Type: boolean
- Properties: Defaulted on create, Filter, Group, Sort
- Introduced: API version 45.0
- Description: Indicates whether the PricebookEntry has been archived (true) or not (false). This field is set to
truewhen the Product2 record it’s associated with is archived, or when the Pricebook2 record is archived. This field is read only. Label is Archived. - Default value: false
- Type: currency
- Properties: Create, Filter, Nillable, Sort, Update
- Introduced: API version 59.0
- Type: string
- Properties: Filter, Group, Nillable, Sort
- Description: Name of this PricebookEntry record. This read-only field references the value in the Name field of the Product2 record. Label is Product Name.
-
Type: reference
-
Properties: Create, Filter, Group, Sort
-
Description:
Required. ID of the Pricebook2 record with which this record is associated. This field must be specified when creating Pricebook2 records. It can’t be changed in an update.
This field is a relationship field.
-
Relationship name: Pricebook2
-
Relationship type: relationship
-
Refers to: Pricebook2
-
Type: reference
-
Properties: Create, Filter, Group, Sort
-
Description:
Required. ID of the Product2 record with which this record is associated. This field must be specified when creating Product2 records. It can’t be changed in an update.
This is a relationship field.
-
Relationship name: Product2
-
Relationship type: relationship
-
Refers to: Product2
- Type: string
- Properties: Filter, Group, Nillable, Sort
- Description: Product code for this record. This read-only field references the value in the ProductCode field of the associated Product2 record.
- Type: reference
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 55.0
- Description: The ID of the related product selling model. This field is available when Subscription Management is enabled.
- Relationship name: ProductSellingModel
- Relationship type: relationship
- Refers to: ProductSellingModel
- Type: currency
- Properties: Create, Filter, Sort, Update
- Description: Required. Unit price for this price book entry. You can specify a value only if
UseStandardPriceis set tofalse. Label is List Price.
- Type: boolean
- Properties: Create, Defaulted on create, Filter, Group, Sort, Update
- Description: Indicates whether this price book entry uses the standard price defined in the standard Pricebook2 record (
true) or not (false). If set totrue, then theUnitPricefield is read-only, and the value is the same as theUnitPricevalue in the corresponding PricebookEntry in the standard price book (that is, the PricebookEntry record whosePricebook2Idrefers to the standard price book and whoseProduct2IdandCurrencyIsoCodeare the same as this record). For PricebookEntry records associated with the standard Pricebook2 record, this field must be set totrue. - Default value: false
Use this object to define the association between your organization’s products (Product2) and your organization’s standard price book or to custom price books ( Pricebook2). Create one PricebookEntry record for each standard or custom price and currency combination for a product in a Pricebook2.
When creating these records, you must specify the IDs of the associated Pricebook2 record and Product2 record. Once these records are created, your client application can’t update these IDs.
This object is defined only for those organizations that have products enabled as a feature. If the organization doesn’t have the products feature enabled, then the PricebookEntry object doesn’t appear in the describeGlobal call, and you can’t access it.
If you delete a PriceBookEntry that is referenced by a line item, the line item is unaffected, but the PriceBookEntry is archived and unavailable from the API. Deleted PriceBookEntry records can’t be recovered.
You must load the standard price for a product before you’re permitted to load its custom prices.
This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version.
-
PricebookEntryChangeEvent: Introduced in API version 57.0.