Share via


CancelPromoCodeGeneration Method

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

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

See Also

Reference

MarketingWebService Class

MarketingWebService Members

Microsoft.CommerceServer.Marketing.WebService Namespace