Partager via


TrackingNumber Property

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

Gets or sets a string value that uniquely identifies a placed purchase order.

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

Syntax

'Declaration
Public Property TrackingNumber As String
'Usage
Dim instance As OrderGroup
Dim value As String

value = instance.TrackingNumber

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

Property Value

Type: System..::.String
A unique identifier for a placed purchase order, either assigned by the order system or set by the user from an ERP tracking number source. The default value is nullNothingnullptra null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
InvalidOperationException

The current instance has been disposed.

ArgumentException

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

Remarks

This value is a string to allow use of non-numeric, unique tracking numbers assigned by a shipping company to be applied to an order. It is present in the Basket, OrderTemplate, and PurchaseOrder classes so that it can be set as part of pre-checkout processing of a basket if a tracking number is known prior to conversion of a basket to a placed purchase order. This property value defaults to nullNothingnullptra null reference (Nothing in Visual Basic) at creation of a basket or order template; if it is still nullNothingnullptra null reference (Nothing in Visual Basic) when a basket is converted to a purchase order (using SaveAsOrder), a new, unique 64-bit integer value will be generated, converted to a string, and placed in this property, so that the uniqueness characteristics of this field are upheld when saving the purchase order.

The string value provided to the setter is trimmed prior to use.

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

Permissions

See Also

Reference

OrderGroup Class

OrderGroup Members

Microsoft.CommerceServer.Runtime.Orders Namespace