RemoveRelationshipToProduct Method

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

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

Syntax

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

instance.RemoveRelationshipToProduct(targetCatalogName, _
    targetProductId, relationshipName)
public void RemoveRelationshipToProduct(
    string targetCatalogName,
    string targetProductId,
    string relationshipName
)
public:
void RemoveRelationshipToProduct(
    String^ targetCatalogName, 
    String^ targetProductId, 
    String^ relationshipName
)
public function RemoveRelationshipToProduct(
    targetCatalogName : String, 
    targetProductId : String, 
    relationshipName : String
)

Parameters

  • targetProductId
    Type: System..::.String
    The product 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 products. 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.

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

  • Exist in the catalog system.

The targetProductId should:

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

  • Not exceed 343 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