Share via


GetOrderTemplate Method (Guid)

Returns an existing OrderTemplate using the specified customer identifier, or creates a new order template if one does not already exist.

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

Syntax

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

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

Parameters

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

Return Value

Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderTemplate
An instance of the OrderTemplate instance, or a new order template, if one is not found.

Exceptions

Exception Condition
ArgumentException

The specified customer identifier is empty.

Remarks

Use this method to retrieve a OrderTemplate meeting the specified criteria, the identifier of the customer. If no OrderTemplate currently exists, one is created.

Permissions

See Also

Reference

OrderContext Class

OrderContext Members

GetOrderTemplate Overload

Microsoft.CommerceServer.Runtime.Orders Namespace