Delen via


GetLastGenerationStatusForUser Method

Get status of the last import/generation task started by the current caller for the given definition.

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

Syntax

'Declaration
Public Function GetLastGenerationStatusForUser ( _
    promoCodeDefinitionId As Integer _
) As PromoCodeOperationStatus
'Usage
Dim instance As PromoCodeDefinitionManager
Dim promoCodeDefinitionId As Integer
Dim returnValue As PromoCodeOperationStatus

returnValue = instance.GetLastGenerationStatusForUser(promoCodeDefinitionId)
public PromoCodeOperationStatus GetLastGenerationStatusForUser(
    int promoCodeDefinitionId
)
public:
PromoCodeOperationStatus^ GetLastGenerationStatusForUser(
    int promoCodeDefinitionId
)
public function GetLastGenerationStatusForUser(
    promoCodeDefinitionId : int
) : PromoCodeOperationStatus

Parameters

Return Value

Type: Microsoft.CommerceServer.Marketing..::.PromoCodeOperationStatus
A PromoCodeOperationStatus object describing the current status of the import or generation task.

Exceptions

Exception Condition
ArgumentOutOfRangeException

The promoCodeDefinitionId provided is not a valid Id value.

InvalidImportTokenException

The promo code generation batch does not have a required entry in the upload table.

EntityDoesNotExistException

The promo code generation batch does not have a required entry in the promo code generation table.

ServerFaultException

An unexpected error occurred on the server.

Remarks

Use this method to get status of the last import/generation task started by the current caller for the given definition.

Permissions

See Also

Reference

PromoCodeDefinitionManager Class

PromoCodeDefinitionManager Members

Microsoft.CommerceServer.Marketing Namespace