OrderGroup.PutItemValue

Ee800135.c++_on(en-US,CS.10).gifEe800135.vb_off(en-US,CS.10).gif

Use this method to put the specified values into the specified keys of the line item.

Definition

Sub PutItemValue(strKey As String,vtValue As Variant,Optional bOverWrite As Boolean,Optional nItemIndex As Variant,Optional strOrderFormName As Variant)

Parameters

strKey

A String that specifies the key whose attribute will store the value specified by the vtValue parameter.

vtValue

A VARIANT that specifies the value to store in the attribute of the key specified by the strKey parameter.

bOverWrite

A Boolean that indicates whether to overwrite the existing attribute of the key specified by the strKey parameter. A value of True indicates that the attribute will be overwritten. A value of False indicates that the attribute will not be overwritten.

nItemIndex

A Variant that specifies the line-item index.

strOrderFormName

A Variant that specifies the OrderForm name.

Return Values

None.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

If the line-item index is specified, this method sets the name value pair for the specified line item on the OrderForm specified in the strOrderFormName parameter. (The strOrderFormName parameter defaults to "default" if unspecified.)

If the line item index is not specified, this method sets the name value pair for all line items for the specified OrderForm. If no OrderForm name is specified, this method sets the name value pair for all line items in the OrderGroup.

If there is no OrderForm for the strOrderFormName specified in the strOrderFormName parameter, one is created.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

' oOrderGroup is a Commerce.OrderGroup object
oOrderGroup.PutItemValue(payment_method, credit_card, False)

See Also

OrderGroup Object


All rights reserved.