Jaa


CreateOrderTemplate Method

Creates and returns a new instance of the OrderTemplate class using the specified customer identifier.

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

Syntax

'Declaration
Public Function CreateOrderTemplate ( _
    userId As Guid _
) As OrderTemplate
'Usage
Dim instance As OrderContext
Dim userId As Guid
Dim returnValue As OrderTemplate

returnValue = instance.CreateOrderTemplate(userId)
public OrderTemplate CreateOrderTemplate(
    Guid userId
)
public:
OrderTemplate^ CreateOrderTemplate(
    Guid userId
)
public function CreateOrderTemplate(
    userId : Guid
) : OrderTemplate

Parameters

  • userId
    Type: System..::.Guid
    The identifier of the customer owning this template.

Return Value

Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderTemplate
A new OrderTemplate instance.

Exceptions

Exception Condition
ArgumentException

The specified customer identifier is empty.

Remarks

Use this method to create a new order template instance. When a template is created, a unique template identifier is automatically assigned. The order group identifier for a template is the same as the template identifier.

Permissions

See Also

Reference

OrderContext Class

OrderContext Members

Microsoft.CommerceServer.Runtime.Orders Namespace