Share via


ProductVariantId Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets or sets the product variant identifier for the current line item.

Namespace:  Microsoft.CommerceServer.Runtime.Orders
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Property ProductVariantId As String
'Usage
Dim instance As LineItem
Dim value As String

value = instance.ProductVariantId

instance.ProductVariantId = value
public string ProductVariantId { get; set; }
public:
property String^ ProductVariantId {
    String^ get ();
    void set (String^ value);
}
public function get ProductVariantId () : String
public function set ProductVariantId (value : String)

Property Value

Type: System..::.String
The product variant identifier for the current instance.

Exceptions

Exception Condition
ArgumentException

The length of the string being set is greater than the maximum allowable length specified in the orders storage mapping file.

Remarks

Stores the product variant identifier for the current line item. For example, a shirt with three sizes might be represented by three variants.

ProductVariantId is one of the required properties (in addition to ProductCatalog and ProductId) to uniquely identify an item in the catalog. ProductVariantId is trimmed of leading and trailing white space characters before being set.

The default maximum length for ProductVariantId is 255 characters, as defined in the corresponding table column constraint specified in the default orders storage mapping file, OrderObjectMappings.xml.

Permissions

See Also

Reference

LineItem Class

LineItem Members

Microsoft.CommerceServer.Runtime.Orders Namespace