Share via


GetPromoCodeDefinition Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets a PromoCodeDefinition specified by an identifier.

Namespace:  Microsoft.CommerceServer.Marketing.WebService
Assembly:  Microsoft.CommerceServer.Marketing.DataManagement (in Microsoft.CommerceServer.Marketing.DataManagement.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Overridable Function GetPromoCodeDefinition ( _
    promoCodeDefinitionId As Integer _
) As PromoCodeDefinitionData
'Usage
Dim instance As MarketingWebService
Dim promoCodeDefinitionId As Integer
Dim returnValue As PromoCodeDefinitionData

returnValue = instance.GetPromoCodeDefinition(promoCodeDefinitionId)
[WebMethodAttribute]
public virtual PromoCodeDefinitionData GetPromoCodeDefinition(
    int promoCodeDefinitionId
)
[WebMethodAttribute]
public:
virtual PromoCodeDefinitionData^ GetPromoCodeDefinition(
    int promoCodeDefinitionId
)
public function GetPromoCodeDefinition(
    promoCodeDefinitionId : int
) : PromoCodeDefinitionData

Parameters

Return Value

Type: PromoCodeDefinitionData
A PromoCodeDefinitionData instance associated with the promoCodeDefinitionId.

Exceptions

Exception Condition
ArgumentOutOfRangeException

promoCodeDefinitionId is less than zero.

NotAuthorizedException

The user is not authorized to perform the requested operation.

EntityDoesNotExistException

No definition with this promoCodeDefinitionId Exists.

DatabaseIntegrityException

A serious integrity issue with the database exists.

Remarks

Use this method to retrieve a specific PromoCodeDefinitionData instance containing the PromoCodeDefinition object from the database.

Permissions

See Also

Reference

MarketingWebService Class

MarketingWebService Members

Microsoft.CommerceServer.Marketing.WebService Namespace