CreateCopy Method
Creates a copy of the specified expression and creates a new row when the copy is saved back to the database.
Namespace: Microsoft.CommerceServer.Marketing
Assembly: Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)
Syntax
'Declaration
Public Function CreateCopy ( _
expressionId As Integer, _
isLocal As Boolean _
) As Expression
'Usage
Dim instance As ExpressionManager
Dim expressionId As Integer
Dim isLocal As Boolean
Dim returnValue As Expression
returnValue = instance.CreateCopy(expressionId, _
isLocal)
public Expression CreateCopy(
int expressionId,
bool isLocal
)
public:
Expression^ CreateCopy(
int expressionId,
bool isLocal
)
public function CreateCopy(
expressionId : int,
isLocal : boolean
) : Expression
Parameters
- expressionId
Type: System..::.Int32
The Id of the Expression to copy. May not be less than 1.
- isLocal
Type: System..::.Boolean
true if the expressions is local to a Discount scope, false if it is a global expression.
Return Value
Type: Microsoft.CommerceServer.Marketing..::.Expression
A copy of the specified Expression.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | sourceExpressionId is not a valid Id value. |
NotAuthorizedException | The user is not authorized to perform the requested operation |
Remarks
The newly created Expression is a local Expression by default, even if the source Expression was global.
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.