Disconnect Business Object

The Disconnect Businessobject command dissolves a link that exists between one business object and another.

For example, a student enrolled in a class might discover that other commitments make it impossible to attend. Since the student is withdrawing from the class, you no longer need a relationship that was established between that student and the class.

Use the Disconnect Businessobject command to dissolve the relationship between the business object containing the student record and the object containing the course information:

disconnect businessobject OBJECTID relationship NAME [to|from] OBJECTID [preserve];
  • OBJECTID is the OID or Type Name Revision of the business object. It can also include the in VAULTNAME clause, to narrow down the search.
  • NAME is the name of the relationship type that exists between the two named business objects. If the relationship name is not found or defined, an error message will result.

The Disconnect Businessobject command has two forms: TO and FROM. The form you choose depends on the placement of the two objects you are disconnecting. In our example, the student was assigned to the FROM end and the course was assigned to the TO end. Therefore, to dissolve this relationship, you can write either of these commands:

disconnect businessobject Student “Cheryl Davis”
 Sophomore	relationship “Student/Course Relationship”
		to Course “C Programming Course” 1;
disconnect businessobject Course “C Programming Course” 1
	relationship “Student/Course Relationship”
		from Student “Cheryl Davis” Sophomore

In the first command, the TO form is used. You are dissolving the relationship of student to the course. In the second command, the FROM form is used. You are dissolving the relationship from the student.

Regardless of the form you use, once processed, the relationship that was established between the student and the course is removed.

The direction you select makes a difference when you are dissolving relationships. If you reversed the order of the two business objects, the names would not be found. For example, assume you entered this command:

disconnect businessobject Student “Cheryl Davis” Sophomore
	relationship “Student/Course Relationship”
		from Course “C Programming Course” 1;

This command assumes that the student is the TO end and the course is the FROM end. If the 3DSpace searched for this relationship, a match would not be found and an error message would result. You should check to be sure that you know the correct direction before writing your Disconnect Businessobject command.