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 and order template identifier, or creates a new one if none currently exist.
Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Function GetOrderTemplate ( _
userId As Guid, _
orderGroupId As Guid _
) As OrderTemplate
'Usage
Dim instance As OrderContext
Dim userId As Guid
Dim orderGroupId As Guid
Dim returnValue As OrderTemplate
returnValue = instance.GetOrderTemplate(userId, _
orderGroupId)
public OrderTemplate GetOrderTemplate(
Guid userId,
Guid orderGroupId
)
public:
OrderTemplate^ GetOrderTemplate(
Guid userId,
Guid orderGroupId
)
public function GetOrderTemplate(
userId : Guid,
orderGroupId : Guid
) : OrderTemplate
Parameters
- userId
Type: System..::.Guid
The identifier of the customer owning the order template.
- orderGroupId
Type: System..::.Guid
The template identifier of the order template. Cannot be nullNothingnullptra null reference (Nothing in Visual Basic).
Return Value
Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderTemplate
An instance of the OrderTemplate instance, or a new empty order template instance, if one is not found.
Exceptions
Exception | Condition |
---|---|
ArgumentException | userId or orderGroupId is empty. |
Remarks
Use this method to retrieve a OrderTemplate meeting the specified criteria, the identifier of the customer and the identifier of the order template. 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.