_OrderGroup::SetShippingAddress

Ee824686.c++_off(en-US,CS.10).gifEe824686.vb_on(en-US,CS.10).gif

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

Definition

HRESULT _OrderGroup::SetShippingAddress(BSTRaddress_id,VARIANT_BOOLbOverWrite,VARIANTnItemIndex,VARIANTstrOrderFormName);

Parameters

address_id

[in] A BSTR that specifies the address ID to designate as the shipping address.

bOverWrite

[in, optional, defaultvalue (-1)] A VARIANT_BOOL that indicates whether to overwrite the shipping_address_id, if it already exists. A value of VT_TRUE indicates that an overwrite should occur. A value of VT_FALSE indicates that an overwrite should not occur.

nItemIndex

[in, optional] 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

[in, optional] A VARIANT that specifies the OrderForm on which 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

This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT 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, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return 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.

See Also

OrderGroup Object


All rights reserved.