Jaa


DeleteCategory Method

Deletes the specified Category from the current catalog.

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

Syntax

'Declaration
Public Sub DeleteCategory ( _
    categoryName As String _
)
'Usage
Dim instance As ProductCatalog
Dim categoryName As String

instance.DeleteCategory(categoryName)
public void DeleteCategory(
    string categoryName
)
public:
void DeleteCategory(
    String^ categoryName
)
public function DeleteCategory(
    categoryName : String
)

Parameters

  • categoryName
    Type: System..::.String
    The name of the category to delete. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
EntityDoesNotExistException

The categoryName does not exist in the catalog.

NotAuthorizedException

The caller is not authorized to perform this operation.

Remarks

This method deletes the specified Category from the catalog. You do not need to call Save after you call this method. Deleting a category will not delete the child categories and products under this category. This method deletes the product from the catalog. When the category is deleted the categoryName is stored in the catalog system to support exporting deleted catalog items. You should call the PurgeDeletedItems method to physically remove this information from the catalog system.

Permissions

See Also

Reference

ProductCatalog Class

ProductCatalog Members

Microsoft.CommerceServer.Catalog Namespace