Share via


NewExpressionFromProductPickerProduct Method

Creates a new Expression using the specified catalog name and product Id.

Namespace:  Microsoft.CommerceServer.Marketing
Assembly:  Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)

Syntax

'Declaration
Public Function NewExpressionFromProductPickerProduct ( _
    catalogName As String, _
    productId As String, _
    isLocal As Boolean _
) As Expression
'Usage
Dim instance As ExpressionManager
Dim catalogName As String
Dim productId As String
Dim isLocal As Boolean
Dim returnValue As Expression

returnValue = instance.NewExpressionFromProductPickerProduct(catalogName, _
    productId, isLocal)
public Expression NewExpressionFromProductPickerProduct(
    string catalogName,
    string productId,
    bool isLocal
)
public:
Expression^ NewExpressionFromProductPickerProduct(
    String^ catalogName, 
    String^ productId, 
    bool isLocal
)
public function NewExpressionFromProductPickerProduct(
    catalogName : String, 
    productId : String, 
    isLocal : boolean
) : Expression

Parameters

  • catalogName
    Type: System..::.String
    The catalog name of the new expression. May not be nullNothingnullptra null reference (Nothing in Visual Basic) or an empty string.
  • productId
    Type: System..::.String
    The product Id of the new expression. May not be nullNothingnullptra null reference (Nothing in Visual Basic) or an empty string.
  • 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
The newly created Expression.

Exceptions

Exception Condition
ArgumentNullException

The provided product Id is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentException

The provided product Id is an empty string.

Remarks

The Expression does not exist in the database until Save is called on the Expression object. is not persisted in the database until Save is called.

Permissions

See Also

Reference

ExpressionManager Class

ExpressionManager Members

Microsoft.CommerceServer.Marketing Namespace