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
- promoCodeDefinitionId
Type: System..::.Int32
The Id of the PromoCodeDefinition object to retrieve. Must be greater than 0.
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
- 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.
See Also
Reference
PromoCodeDefinitionManager Class