OrderGroup.SaveAsTemplate
Use this method to save the OrderGroup to the database with a template status.
Definition
Function SaveAsTemplate(Optional strTemplateName As Variant) As Variant
Parameters
strTemplateName
A Variant that specifies the template name.
Return Values
If this method completes successfully, it returns a Variant that specifies the OrderGroupID of the template.
Error Values
This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
Remarks
This method updates the OrderGroup template name field if the strTemplateName parameter is supplied.
If you originally loaded the OrderGroup from another state (ie a basket) and call SaveAsTemplate method, the original OrderGroup remains on disk unchanged.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Example
' oOrderGroup is a Commerce.OrderGroup object
' vResult is a Variant
vResult = oOrderGroup.SaveAsTemplate()