OrderGroup.SetShippingAddress Method (PIA)

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

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Orders
…
Public Sub SetShippingAddress(address_id As String,
  Optional bOverWrite As Boolean,
  Optional nItemIndex As Object,
  Optional strOrderFormName As Object)

[C#]

using Microsoft.CommerceServer.Interop.Orders;
…
public void SetShippingAddress(stringaddress_id,
  boolbOverWrite,
  objectnItemIndex,
  objectstrOrderFormName);

Parameters

[Visual Basic .NET]

  • 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
    An Object that specifies the line-item index where the shipping_address_id will be set. If not specified, all line items will be set.
  • strOrderFormName
    An Object that specifies the OrderForm object to perform the operation. If not specified, all OrderForms will be used if nItemIndex is unspecified; otherwise, the "default" OrderForm will be used.

[C#]

  • address_id
    A string that specifies the address ID to designate as the shipping address.
  • bOverWrite
    A bool 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
    An object that specifies the line-item index where the**shipping_address_id will be set. If not specified, all line items will be set.
  • strOrderFormName
    An object that specifies the OrderForm object 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.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

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.

[Visual Basic .NET]

Example

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

Requirements

Namespace: Microsoft.CommerceServer.Interop.Orders

Platforms: Windows 2000, Windows Server 2003

Assembly: Microsoft.CommerceServer.Interop.Orders.Requisition.dll

See Also

OrderGroup Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.