Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.