OrderGroup.SetShippingAddress

Ee824690.c++_on(en-US,CS.10).gifEe824690.vb_off(en-US,CS.10).gif

Use this method to set the shipping address id for the specified line items.

Definition

Sub SetShippingAddress(address_id As String,Optional bOverWrite As Boolean,Optional nItemIndex As Variant,Optional strOrderFormName As Variant)

Parameters

address_id

A String that specifies the address ID to designate as the shipping address.

bOverWrite

A Boolean that indicates whether to overwrite the shipping_address_id, if it already exists. A value of True indicates that an overwrite should occur. A value of False indicates that an overwrite should not occur.

nItemIndex

A Variant that specifies the line item index where the shipping_address_id will be set.  If not specified, all line items will be set.

strOrderFormName

A Variant that specifies the OrderForm to perform the operation. If not specified, all OrderForms will be used if nItemIndex is unspecified; otherwise, the "default" OrderForm will be used.

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

The bOverWrite, nItemIndex, and strOrderFormName parameters work in a way similar to the same parameters in the PutItemValue method. Before performing the set operations, this method first ensures that the address id exists.

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

Example

' oOrdGrp is a Commerce.OrderGroup object
oOrdGrp.SetShippingAddress(("{34ECC9CC-C33E-11D0-B8A0-00C04FB616C7}", _
    True, 4, "testOrderFormName")

See Also

OrderGroup Object


All rights reserved.