Share via


DeleteProduct Method

Deletes the product from the catalog.

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

Syntax

'Declaration
Public Sub DeleteProduct ( _
    productId As String _
)
'Usage
Dim instance As BaseCatalog
Dim productId As String

instance.DeleteProduct(productId)
public void DeleteProduct(
    string productId
)
public:
void DeleteProduct(
    String^ productId
)
public function DeleteProduct(
    productId : String
)

Parameters

  • productId
    Type: System..::.String
    The product identifier. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).

Exceptions

Exception Condition
EntityDoesNotExistException

The productId does not exist in the catalog.

NotAuthorizedException

The caller is not authorized to perform this operation.

Remarks

This method deletes the product from the catalog. When the product is deleted the productId 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. Deleting a product family will delete all the variants belonging to that product family from the catalog.

The productId should:

  • Not be nullNothingnullptra null reference (Nothing in Visual Basic) or blank.

  • Not exceed 256 characters.

  • Already exist in the catalog.

Permissions

See Also

Reference

BaseCatalog Class

BaseCatalog Members

Microsoft.CommerceServer.Catalog Namespace