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
- targetCatalogName
Type: System..::.String
The target catalog name.
- targetProductId
Type: System..::.String
The product to remove the relationship from.
- relationshipName
Type: System..::.String
The relationship name to remove.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.