This Apex object represents an in-memory CartValidationOutput record and its relationships with other records. All formula and roll-up summary standard fields are updated at runtime. By default, the UI renders CartValidationOutput messages if the value of level is error and the value of type is Inventory, Pricing, Promotions, or Entitlement.
Loading and saving this object is not possible in Apex but is done by Salesforce.
See Object Reference: CartValidationOutput
Constructors
global CartValidationOutput(CartValidationOutputTypeEnum type, CartValidationOutputLevelEnum level)
Constructor for CartValidationOutput object. All arguments are required. The WebCart.Id will be saved in CartValidationOutput.RelatedEntityId.
Parameters
Param
Description
type
Initial value for CartValidationOutput.Type.
level
Initial value for CartValidationOutput.Level.
global CartValidationOutput(CartValidationOutputTypeEnum type, CartValidationOutputLevelEnum level, CartDeliveryGroup cartDeliveryGroup)
Constructor for CartValidationOutput object. All arguments are required.
Parameters
Param
Description
type
Initial value for CartValidationOutput.Type.
level
Initial value for CartValidationOutput.Level.
cartDeliveryGroup
Initial CartExtension.CartDeliveryGroup object related to this object. Its ID will be saved in CartValidationOutput.RelatedEntityId.
global CartValidationOutput(CartValidationOutputTypeEnum type, CartValidationOutputLevelEnum level, CartItem cartItem)
Constructor for CartValidationOutput object. All arguments are required.
Parameters
Param
Description
type
Initial value for CartValidationOutput.Type.
level
Initial value for CartValidationOutput.Level.
cartItem
Initial CartExtension.CartItem object related to this object. Its ID will be saved in CartValidationOutput.RelatedEntityId.
global CartValidationOutput(CartValidationOutputTypeEnum type, CartValidationOutputLevelEnum level, CartTax cartTax)
Constructor for CartValidationOutput object. All arguments are required.
Parameters
Param
Description
type
Initial value for CartValidationOutput.Type.
level
Initial value for CartValidationOutput.Level.
cartTax
Initial CartExtension.CartTax object related to this object. Its ID will be saved in CartValidationOutput.RelatedEntityId.
global void setType(CartValidationOutputTypeEnum type)
Set CartValidationOutput.Type.
Returns
Type
Description
void
global void setLevel(CartValidationOutputLevelEnum type)
Set CartValidationOutput.Level.
Returns
Type
Description
void
global String getMessage()
Get CartValidationOutput.Message.
Returns
Type
Description
String
global void setMessage(String value)
Set CartValidationOutput.Message.
Returns
Type
Description
void
global Boolean isDismissed()
Get CartValidationOutput.IsDismissed.
Returns
Type
Description
Boolean
global void setDismissed(Boolean value)
Get CartValidationOutput.IsDismissed.
Returns
Type
Description
void
global ID getRelatedEntityId()
Get CartValidationOutput.RelatedEntityId.
Returns
Type
Description
ID
ID of related entity. Can be “null” if related entity for this CartValidationOutput has been created during processing of the current request and has not been saved into the DB yet.
global ID getId()
Get Id.
Returns
Type
Description
ID
global Datetime getCreatedDate()
Get System Field CreatedDate.
Returns
Type
Description
Datetime
global Datetime getLastModifiedDate()
Get System Field LastModifiedDate.
Returns
Type
Description
Datetime
global ID getCreatedById()
Get System Field CreatedById.
Returns
Type
Description
ID
global ID getLastModifiedById()
Get System Field LastModifiedById.
Returns
Type
Description
ID
global Object getCustomField(String fieldName)
Get value of the given custom field (needs to be api name)
Returns
Type
Description
Object
global void setCustomField(String fieldName, Object fieldValue)
Set the value of the given custom field (needs to be api name)