다음을 통해 공유


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 ReadOnly Property PrimaryParentCategoryName As String
'Usage
Dim instance As Variant
Dim value As String

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

Property Value

Type: System..::.String
The name of the primary parent catalog for this catalog 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.

Product.PricingCategoryName = "categoryname"

is equivalent to:

Product.PrimaryParentCategoryName = "categoryname" Product.UseCategoryPricing = 1 

Permissions

See Also

Reference

Variant Class

Variant Members

Microsoft.CommerceServer.Catalog Namespace