Partager via


GetPromoCodeDefinition Method

Retrieves an existing PromoCodeDefinition object, specified by the unique identifier.

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

Syntax

'Declaration
Public Function GetPromoCodeDefinition ( _
    promoCodeDefinitionId As Integer _
) As PromoCodeDefinition
'Usage
Dim instance As PromoCodeDefinitionManager
Dim promoCodeDefinitionId As Integer
Dim returnValue As PromoCodeDefinition

returnValue = instance.GetPromoCodeDefinition(promoCodeDefinitionId)
public PromoCodeDefinition GetPromoCodeDefinition(
    int promoCodeDefinitionId
)
public:
PromoCodeDefinition^ GetPromoCodeDefinition(
    int promoCodeDefinitionId
)
public function GetPromoCodeDefinition(
    promoCodeDefinitionId : int
) : PromoCodeDefinition

Parameters

Return Value

Type: Microsoft.CommerceServer.Marketing..::.PromoCodeDefinition
The retrieved PromoCodeDefinition object.

Exceptions

Exception Condition
ArgumentOutOfRangeException

The promoCodeDefinitionId argument value is less than or equal to 0.

EntityDoesNotExistException

A PromoCodeDefinition object with such promoCodeDefinitionId does not exist.

NotAuthorizedException

The user is not authorized to perform this operation.

Remarks

Retrieves the specified PromoCodeDefinition object.

Permissions

See Also

Reference

PromoCodeDefinitionManager Class

PromoCodeDefinitionManager Members

Microsoft.CommerceServer.Marketing Namespace