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 CartItem.Type.

TypeDescription
SalesItemTypeEnumCartExtension.SalesItemTypeEnum

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

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.

TypeDescription
ID

Get CartItem.SubscriptionTerm.

TypeDescription
Integer

Get CartItem.BillingFrequency.

TypeDescription
BillingFrequencyEnumCartExtension.BillingFrequencyEnum

Set CartItem.BillingFrequency.

TypeDescription
void

Get CartItem.PricingTermCount.

TypeDescription
Decimal

Set CartItem.PricingTermCount.

TypeDescription
void

Get CartItem.PricebookEntryId.

TypeDescription
ID

Set CartItem.PricebookEntryId.

TypeDescription
void

Get CartItem.ProrationPolicyId.

TypeDescription
ID

Set CartItem.ProrationPolicyId.

TypeDescription
void

Get CartItem.SellingModelType.

TypeDescription
SellingModelTypeCartExtension.SellingModelType

Set CartItem.SellingModelType.

TypeDescription
void

Get CartItem.UnitPriceAfterAdjustments.

TypeDescription
Decimal

Set CartItem.UnitPriceAfterAdjustments.

TypeDescription
void

Get CartItem.NetUnitPriceAfterAdjustments.

TypeDescription
Decimal

Set CartItem.NetUnitPriceAfterAdjustments.

TypeDescription
void

Get CartItem.FirstPymtPriceAfterAdjustments.

TypeDescription
Decimal

Set CartItem.FirstPymtPriceAfterAdjustments.

TypeDescription
void

Get CartItem.FirstPymtTax.

TypeDescription
Decimal

Set CartItem.FirstPymtTax.

TypeDescription
void

Inherited

Get Id.

TypeDescription
ID

Inherited

Get System Field CreatedDate.

TypeDescription
Datetime

Inherited

Get System Field LastModifiedDate.

TypeDescription
Datetime

Inherited

Get System Field CreatedById.

TypeDescription
ID

Inherited

Get System Field LastModifiedById.

TypeDescription
ID

Inherited

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

TypeDescription
Object

Inherited

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

TypeDescription
void

Inherited

Inherited