Update Manual Relationships (System Relationships)
The method updates the manually created relationships between an item and other items, adding a new system managed relationship.
- Connect to the configuration web service.
- Specify the identifier of the item.
- Specify the identifier of the target item.
- Specify a valid system relationship type.
Code Sample
# Set the variables.
$itemID = 1234;
$targetItemID = 5678;
$relationshipType = "IsSupportedBy";
# Get the manual relationships.
$manualRelationships = $xia.GET_ManualRelationships($itemID);
# Create a new relationship.
$manualRelationship = New-Object "$($xia.GetType().Namespace).ManualRelationship";
$manualRelationship.CreateInboundConnection = $false;
$manualRelationship.RelationshipType = $relationshipType;
$manualRelationship.TargetItemID = $targetItemID;
# Add the manual relationship to the collection.
$manualRelationships.ManualRelationship += $manualRelationship;
# Update the relationships.
$xia.SET_ManualRelationships($itemID, $manualRelationships);