PublicPromoCode Property
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Gets or sets the public promotion code string for Public promotion codes.
Namespace: Microsoft.CommerceServer.Marketing
Assembly: Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)
Syntax
'Declaration
Public Property PublicPromoCode As String
'Usage
Dim instance As PromoCodeDefinition
Dim value As String
value = instance.PublicPromoCode
instance.PublicPromoCode = value
public string PublicPromoCode { get; set; }
public:
property String^ PublicPromoCode {
String^ get ();
void set (String^ value);
}
public function get PublicPromoCode () : String
public function set PublicPromoCode (value : String)
Property Value
Type: System..::.String
The public promotion code string for Public promotion codes.
Exceptions
Exception | Condition |
---|---|
PromoCodeUsageValidationException | An attempt was made to set the string to a non-nullNothingnullptra null reference (Nothing in Visual Basic) value when PromoCodeUsageOption is set to something other than Public. |
PromoCodeUsageValidationException | An attempt was made to set the string to an empty string or nullNothingnullptra null reference (Nothing in Visual Basic) value when PromoCodeUsageOption is set to Public. |
StringLengthValidationException | The length of the promotion code string exceeds maximum allowed. |
Remarks
The value of a PublicPromoCode must be unique. PublicPromoCode only has meaning on Public promotion codes. For other types of codes, the value is the empty string. PublicPromoCode can only be set to a non-empty value if the UsageOption is Public.
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.