SaveExpression Method
Insert a new Expression (if the identifier is zero), or updates an existing Expression (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 SaveExpression ( _
expression As ExpressionData, _
forceOverwrite As Boolean _
) As ExpressionData
'Usage
Dim instance As MarketingWebService
Dim expression As ExpressionData
Dim forceOverwrite As Boolean
Dim returnValue As ExpressionData
returnValue = instance.SaveExpression(expression, _
forceOverwrite)
[WebMethodAttribute]
public virtual ExpressionData SaveExpression(
ExpressionData expression,
bool forceOverwrite
)
[WebMethodAttribute]
public:
virtual ExpressionData^ SaveExpression(
ExpressionData^ expression,
bool forceOverwrite
)
public function SaveExpression(
expression : ExpressionData,
forceOverwrite : boolean
) : ExpressionData
Parameters
- expression
Type: ExpressionData
The Expression data to be saved (set to zero for an insert).
- forceOverwrite
Type: System..::.Boolean
true to indicate that existing settings should be overwritten even if they are more recent; otherwise false.
Return Value
Type: ExpressionData
An ExpressionData with the specified Expression.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | An input argument or one of the required properties is nullNothingnullptra null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException | expression is less than zero. |
NotAuthorizedException | The user is not authorized to perform the requested operation. |
EntityStateException | The expression has been deleted (update). |
EntityDoesNotExistException | The expression 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 Id already exists. |
InvalidCatalogOperationException | An attempt was made to directly access a local expression. A local expression only exists in the context of a campaign item and must be saved and retrieved with the campaign item. |
DatabaseIntegrityException | A serious integrity issue with the database exists. |
Remarks
Saves the specified Expression object to the database. Inserts a new Expression (if the identifier is zero), or updates an existing Campaign (if the identifier is not zero).
Use forceOverwrite to prevent overwriting the object in the database.
The forceOverwrite controls optimistic locking behavior. If the value is false and the record was modified in the database after it was loaded for editing, then an exception is raised.
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.