Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This method is used to cancel promo codes for a discount.
Namespace: Microsoft.CommerceServer.Marketing.WebService
Assembly: Microsoft.CommerceServer.Marketing.DataManagement (in Microsoft.CommerceServer.Marketing.DataManagement.dll)
Syntax
'Declaration
<WebMethodAttribute> _
Public Overridable Function CancelPromoCodeGeneration ( _
promoCodeDefinitionId As Integer _
) As Guid
'Usage
Dim instance As MarketingWebService
Dim promoCodeDefinitionId As Integer
Dim returnValue As Guid
returnValue = instance.CancelPromoCodeGeneration(promoCodeDefinitionId)
[WebMethodAttribute]
public virtual Guid CancelPromoCodeGeneration(
int promoCodeDefinitionId
)
[WebMethodAttribute]
public:
virtual Guid CancelPromoCodeGeneration(
int promoCodeDefinitionId
)
public function CancelPromoCodeGeneration(
promoCodeDefinitionId : int
) : Guid
Parameters
- promoCodeDefinitionId
Type: System..::.Int32
The Identifier of the PromoCodeDefinition for which generation/import cancellation is requested.
Return Value
Type: System..::.Guid
The Batch Id of the batch that was being processed.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | promoCodeDefinitionId is less than zero. |
EntityDoesNotExistException | promoCodeDefinitionId does not exist. |
InvalidCatalogOperationException | No operation found to cancel. |
NotAuthorizedException | The user is not authorized to perform the requested operation. |
DatabaseIntegrityException | A serious integrity issue with the database. |
Remarks
The discount must already be associated with a PromoCodeDefinition. You can use the returned Batch identifier to get the status of the cancel operation.
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.