שתף באמצעות


PrimaryParentCategoryName Property

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

Gets or sets the primary parent category for the current catalog item.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Property PrimaryParentCategoryName As String
'Usage
Dim instance As CatalogItem
Dim value As String

value = instance.PrimaryParentCategoryName

instance.PrimaryParentCategoryName = value
public string PrimaryParentCategoryName { get; set; }
public:
property String^ PrimaryParentCategoryName {
    String^ get ();
    void set (String^ value);
}
public function get PrimaryParentCategoryName () : String
public function set PrimaryParentCategoryName (value : String)

Property Value

Type: System..::.String
The name of the primary parent category for this item.

Exceptions

Exception Condition
ArgumentNullException

The primary parent category is nullNothingnullptra null reference (Nothing in Visual Basic).

ValidationException

The primary parent category is invalid.

Remarks

This property should not be set on a product or a category in a virtual catalog. It should only be set on a product or a category which has been created in a base catalog. You should call the Save method after you set the primary parent category. Setting this property to nullNothingnullptra null reference (Nothing in Visual Basic) will remove the current primary parent category on the catalog item. If the primary parent category does not exist as a parent category of this catalog item then the primary parent category will also be added as a parent category of this catalog item. If this property is called on a Product and the product uses UseCategoryPricing then the product will inherit its price from this primary parent category. The primary parent category:

  • Can be nullNothingnullptra null reference (Nothing in Visual Basic).

  • Should not exceed 128 characters.

  • Should already exist in the catalog.

Permissions

See Also

Reference

CatalogItem Class

CatalogItem Members

Microsoft.CommerceServer.Catalog Namespace