Share via


SaveDisplayTemplate Method

Insert a new DisplayTemplate (if the identifier is zero), or updates an existing DisplayTemplate (if the identifier is not zero).

Namespace:  Microsoft.CommerceServer.Marketing.WebService
Assembly:  Microsoft.CommerceServer.Marketing.DataManagement (in Microsoft.CommerceServer.Marketing.DataManagement.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Overridable Function SaveDisplayTemplate ( _
    template As DisplayTemplateData _
) As DisplayTemplateData
'Usage
Dim instance As MarketingWebService
Dim template As DisplayTemplateData
Dim returnValue As DisplayTemplateData

returnValue = instance.SaveDisplayTemplate(template)
[WebMethodAttribute]
public virtual DisplayTemplateData SaveDisplayTemplate(
    DisplayTemplateData template
)
[WebMethodAttribute]
public:
virtual DisplayTemplateData^ SaveDisplayTemplate(
    DisplayTemplateData^ template
)
public function SaveDisplayTemplate(
    template : DisplayTemplateData
) : DisplayTemplateData

Parameters

  • template
    Type: DisplayTemplateData
    The Display Template data to be saved (set to zero for an insert).

Return Value

Type: DisplayTemplateData
A DisplayTemplateData with the specified DisplayTemplate.

Exceptions

Exception Condition
ArgumentNullException

An input argument or one of the required properties is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The Display Template identifier is less than zero.

NotAuthorizedException

The user is not authorized to perform the requested operation.

EntityStateException

The Display Template has been deleted (update).

EntityDoesNotExistException

The template being updated does not exist.

StringLengthValidationException

One if the property values is too long or too short.

DuplicateEntityNameException

An entity with this name already exists.

DuplicateEntityIdException

An entity with this template already exists.

DatabaseIntegrityException

A serious integrity issue with the database exists.

Remarks

Saves the specified DisplayTemplate object to the database. Inserts a new DisplayTemplate (if the identifier is zero), or updates an existing DisplayTemplate (if the identifier is not zero).

Permissions

See Also

Reference

MarketingWebService Class

MarketingWebService Members

Microsoft.CommerceServer.Marketing.WebService Namespace