CartExtension.CartItem

This Apex object represents an in-memory CartItem record and its relationships with other records. All formula and roll-up summary standard fields are updated at runtime.
Loading and saving this object is not possible in Apex but is done by Salesforce.
See Object Reference: CartItem

Constructor for CartItem object. All arguments are required.

ParamDescription
salesItemTypeInitial value for CartItem.Type.
cartDeliveryGroupInitial CartExtension.CartDeliveryGroup object related to this object. Its ID will be saved in CartItem.CartDeliveryGroupId.
nameInitial value for CartItem.Name.

Get the CartExtension.CartDeliveryGroup object whose ID was saved in CartItem.Id.

TypeDescription
CartDeliveryGroupCartExtension.CartDeliveryGroup

Set the related CartExtension.CartDeliveryGroup object whose ID is stored in CartItem.Id on save.

TypeDescription
voidCartExtension.CartDeliveryGroup

Get the Parent CartExtension.CartItem object whose ID was saved in CartItem.Id.

TypeDescription
CartItemCartExtension.CartItem

Set the related Parent CartExtension.CartItem object whose ID is stored in CartItem.Id on save.

TypeDescription
voidCartExtension.CartItem

Get all the related CartExtension.CartItem objects.

TypeDescription
CartItemListCartExtension.CartItemList

Get CartItem.Type.

TypeDescription
SalesItemTypeEnumCartExtension.SalesItemTypeEnum

Get CartItem.SubType.

TypeDescription
CartItemSubTypeEnumCartExtension.CartItemSubTypeEnum

Set CartItem.SubType.

TypeDescription
void

Get CartItem.Name.

TypeDescription
String

Set CartItem.Name.

TypeDescription
void

Get CartItem.Product2Id.

TypeDescription
ID

Set CartItem.Product2Id.

TypeDescription
void

Get CartItem.Sku.

TypeDescription
String

Set CartItem.Sku.

TypeDescription
void

Get CartItem.Quantity.

TypeDescription
Decimal

Set CartItem.Quantity.

TypeDescription
void

Get CartItem.ListPrice.

TypeDescription
Decimal

Get CartItem.ListPrice.

TypeDescription
void

Get CartItem.SalesPrice.

TypeDescription
Decimal

Set CartItem.SalesPrice.

TypeDescription
void

Get CartItem.UnitAdjustedPrice.

TypeDescription
Decimal

Set CartItem.UnitAdjustedPrice.

TypeDescription
void

Set CartItem.UnitItemAdjustmentAmount.

TypeDescription
void

Get CartItem.UnitItemAdjustmentAmount.

TypeDescription
Decimal

Set CartItem.UnitAdjustedPriceWithItemAdj.

TypeDescription
void

Get CartItem.UnitAdjustedPriceWithItemAdj.

TypeDescription
Decimal

Set CartItem.TotalListPrice.

TypeDescription
void

Get CartItem.TotalListPrice.

TypeDescription
Decimal

Set CartItem.TotalFirstPymtListPrice.

TypeDescription
void

Get CartItem.TotalFirstPymtListPrice.

TypeDescription
Decimal

Get CartItem.TotalPrice.

TypeDescription
Decimal

Set CartItem.TotalPrice.

TypeDescription
void

Get CartItem.NetUnitPrice.

TypeDescription
Decimal

Set CartItem.NetUnitPrice.

TypeDescription
void

Get CartItem.GrossUnitPrice.

TypeDescription
Decimal

Set CartItem.GrossUnitPrice.

TypeDescription
void

Get CartItem.TotalLineTaxAmount.

TypeDescription
Decimal

Get CartItem.ItemizedAdjustmentAmount.

TypeDescription
Decimal

Get CartItem.DistributedAdjustmentAmount.

TypeDescription
Decimal

Get CartItem.AdjustmentAmount.

TypeDescription
Decimal

Set CartItem.AdjustmentAmount.

TypeDescription
void

Set CartItem.TotalPromoAdjustmentAmount.

TypeDescription
void

Get CartItem.TotalPromoAdjustmentAmount.

TypeDescription
Decimal

Get CartItem.TotalTaxAmount.

TypeDescription
Decimal

Get CartItem.TotalLineAmount.

TypeDescription
Decimal

Set CartItem.TotalLineAmount.

TypeDescription
void

Get CartItem.TotalAmount.

TypeDescription
Decimal

Get CartItem.ItemizedAdjustmentTaxAmount.

TypeDescription
Decimal

Get CartItem.DistributedAdjustmentTaxAmount.

TypeDescription
Decimal

Get CartItem.AdjustmentTaxAmount.

TypeDescription
Decimal

Set CartItem.AdjustmentTaxAmount.

TypeDescription
void

Get CartItem.TotalPriceAfterAllAdjustments.

TypeDescription
Decimal

Set CartItem.TotalPriceAfterAllAdjustments.

TypeDescription
void

Get CartItem.UnitAdjustmentAmount.

TypeDescription
Decimal

Set CartItem.UnitAdjustmentAmount.

TypeDescription
void

Get CartItem.TotalAdjustmentAmount.

TypeDescription
Decimal

Set CartItem.TotalAdjustmentAmount.

TypeDescription
void

Get all CartExtension.CartItemPriceAdjustment objects associated with the current CartItem. Specifically, fetch CartItemPriceAdjustment instances where the CartItemPriceAdjustment.CartItem matches the ID of the current CartItem.

TypeDescription
CartItemPriceAdjustmentListCartExtension.CartItemPriceAdjustmentList

Get all CartExtension.CartTax objects associated with the current CartItem. Specifically, fetch CartTax instances where the CartTax.CartItem matches the ID of the current CartItem. This method doesn't include tax adjustments that are related to item price adjustments for the CartItem, such as CartTax related to a CartItemPriceAdjustment.

TypeDescription
CartTaxListCartExtension.CartTaxList

Get CartItem.TotalLineNetAmount.

TypeDescription
Decimal

Get CartItem.TotalLineGrossAmount.

TypeDescription
Decimal

Get CartItem.ProductSellingModelId. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
ID

Get CartItem.SubscriptionTerm. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
Integer

Get CartItem.BillingFrequency. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
BillingFrequencyEnumCartExtension.BillingFrequencyEnum

Set CartItem.BillingFrequency. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
void

Get CartItem.PeriodBoundary.

TypeDescription
PeriodBoundaryEnumCartExtension.PeriodBoundaryEnum

Get CartItem.PeriodBoundaryDay.

TypeDescription
IntegerInteger

Get CartItem.PeriodBoundaryStartMonth.

TypeDescription
IntegerInteger

Get CartItem.PricingTermCount. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
Decimal

Set CartItem.PricingTermCount. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
void

Get CartItem.PricebookEntryId. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
ID

Set CartItem.PricebookEntryId. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
void

Get CartItem.ProrationPolicyId. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
ID

Set CartItem.ProrationPolicyId. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
void

Get CartItem.SellingModelType. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
SellingModelTypeCartExtension.SellingModelType

Set CartItem.SellingModelType. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
void

Get CartItem.UnitPriceAfterAdjustments. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
Decimal

Set CartItem.UnitPriceAfterAdjustments. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
void

Get CartItem.NetUnitPriceAfterAdjustments. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
Decimal

Set CartItem.NetUnitPriceAfterAdjustments. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
void

Get CartItem.FirstPymtPriceAfterAdjustments. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
Decimal

Set CartItem.FirstPymtPriceAfterAdjustments. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
void

Get CartItem.FirstPymtTax. This method is only available for organizations that have Commerce Subscription Plus enabled.

TypeDescription
Decimal

Set CartItem.FirstPymtTax.

TypeDescription
void

Get CartItem.TotalFirstPymtPrice.

TypeDescription
Decimal

Get CartItem.TotalFirstPymtAdjAmount.

TypeDescription
Decimal

Get CartItem.TotalLineFirstPymtTaxAmount.

TypeDescription
Decimal

Set CartItem.ProductRelatedComponentId.

TypeDescription
void

Get CartItem.ProductRelatedComponentId.

TypeDescription
ID

Set CartItem.ProductClass.

TypeDescription
void

Get CartItem.ProductClass.

TypeDescription
ProductClassCartExtension.ProductClass

Set CartItem.StockCheckMethod

TypeDescription
void

Get CartItem.StockCheckMethod.

TypeDescription
StockCheckMethodCartExtension.StockCheckMethod

Set CartItem.PerUnitWeight.

TypeDescription
void

Get CartItem.getPerUnitWeight.

TypeDescription
DecimalDecimal

Set CartItem.WeightUnit.

TypeDescription
void

Get CartItem.getWeightUnit.

TypeDescription
StringgetWeightUnit

Get CartItem.getTotalWeight.

TypeDescription
DecimalDecimal

Set CartItem.TaxTreatmentId.

TypeDescription
void

Get CartItem.TaxTreatmentId.

TypeDescription
IDTaxTreatmentId

Get CartItem.IsShippingChargeNotApplicable.

TypeDescription
BooleanBoolean

Set CartItem.IsShippingChargeNotApplicable.

TypeDescription
void

Get Id.

TypeDescription
ID

Get System Field CreatedDate.

TypeDescription
Datetime

Get System Field LastModifiedDate.

TypeDescription
Datetime

Get System Field CreatedById.

TypeDescription
ID

Get System Field LastModifiedById.

TypeDescription
ID

Get value of the given custom field (needs to be api name)

TypeDescription
Object

Set the value of the given custom field (needs to be api name)

TypeDescription
void