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