Partager via


RemoveRelationshipToCategory Method

Removes an existing category relationship to the category in the catalog.

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

Syntax

'Declaration
Public Sub RemoveRelationshipToCategory ( _
    targetCatalogName As String, _
    targetCategoryName As String, _
    relationshipName As String _
)
'Usage
Dim instance As CatalogItem
Dim targetCatalogName As String
Dim targetCategoryName As String
Dim relationshipName As String

instance.RemoveRelationshipToCategory(targetCatalogName, _
    targetCategoryName, relationshipName)
public void RemoveRelationshipToCategory(
    string targetCatalogName,
    string targetCategoryName,
    string relationshipName
)
public:
void RemoveRelationshipToCategory(
    String^ targetCatalogName, 
    String^ targetCategoryName, 
    String^ relationshipName
)
public function RemoveRelationshipToCategory(
    targetCatalogName : String, 
    targetCategoryName : String, 
    relationshipName : String
)

Parameters

  • targetCategoryName
    Type: System..::.String
    The category to remove the relationship from.

Exceptions

Exception Condition
ArgumentNullException

The relationshipName is nullNothingnullptra null reference (Nothing in Visual Basic).

ValidationException

The relationshipName is not valid.

EntityDoesNotExistException

The relationshipName does not exist.

Remarks

You can use this method to remove existing relationships from other categories. You should call the Save method to save the relationships to the catalog system. The targetCatalogName should:

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

  • Not exceed 85 characters.

  • ot contain the .,"[]'()# characters.

  • Exist in the catalog system.

The targetCategoryName should:

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

  • Not exceed 215 characters.

  • Exist in the targetCatalogName.

The relationshipName should:

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

  • Not exceed 128 characters.

Permissions

See Also

Reference

CatalogItem Class

CatalogItem Members

Microsoft.CommerceServer.Catalog Namespace