Share via


ExportPromoCodesForDefinition Method (String, Int32, Guid, PromoCodeDefinitionManager.ProgressEventHandler)

Synchronously saves all promocodes in a given definition and batch to a file.

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

Syntax

'Declaration
Public Sub ExportPromoCodesForDefinition ( _
    filePath As String, _
    promoCodeDefinitionId As Integer, _
    batchId As Guid, _
    eventHandler As PromoCodeDefinitionManager..::.ProgressEventHandler _
)
'Usage
Dim instance As PromoCodeDefinitionManager
Dim filePath As String
Dim promoCodeDefinitionId As Integer
Dim batchId As Guid
Dim eventHandler As PromoCodeDefinitionManager..::.ProgressEventHandler

instance.ExportPromoCodesForDefinition(filePath, _
    promoCodeDefinitionId, batchId, _
    eventHandler)
public void ExportPromoCodesForDefinition(
    string filePath,
    int promoCodeDefinitionId,
    Guid batchId,
    PromoCodeDefinitionManager..::.ProgressEventHandler eventHandler
)
public:
void ExportPromoCodesForDefinition(
    String^ filePath, 
    int promoCodeDefinitionId, 
    Guid batchId, 
    PromoCodeDefinitionManager..::.ProgressEventHandler^ eventHandler
)
public function ExportPromoCodesForDefinition(
    filePath : String, 
    promoCodeDefinitionId : int, 
    batchId : Guid, 
    eventHandler : PromoCodeDefinitionManager..::.ProgressEventHandler
)

Parameters

  • filePath
    Type: System..::.String
    Full path to the file to which the promotion codes will be exported.
  • batchId
    Type: System..::.Guid
    Id of the batch whose promotion codes will be exported.

Exceptions

Exception Condition
NotAuthorizedException

The user is not authorized to perform this operation.

ArgumentOutOfRangeException

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

EntityDoesNotExistException

A PromoCodeDefinition object with such promoCodeDefinitionId does not exist.

Remarks

eventHandler may be nullNothingnullptra null reference (Nothing in Visual Basic) if the caller does not wish to receive progress notifications.

Permissions

See Also

Reference

PromoCodeDefinitionManager Class

PromoCodeDefinitionManager Members

ExportPromoCodesForDefinition Overload

Microsoft.CommerceServer.Marketing Namespace

PromoCodeDefinitionManager..::.ProgressEventHandler