Delete Business Object

You can remove an entire business object (including all checked in files) or you can remove single files from the business object with the Delete Businessobject command.

delete businessobject OBJECTID [[format FORMAT_NAME] file FILENAME{,FILENAME}];
Or:
delete businessobject OBJECTID [[format FORMAT_NAME] file all];

  • OBJECTID is the OID or Type Name Revision of the business object to be deleted or from which files should be deleted.
  • FORMAT_NAME is the name of the format of the files to be removed from the business object. If none is specified the default format is assumed.
  • FILENAME indicates a checked in file to be removed from the business object. You can use the All argument (rather than FILENAME ) to remove all checked in files for a given format.

Do not delete the persons creator, guest, or Test Everything using MQL. Deleting these objects could cause triggers, programs or other application functions not to work.

When this command is processed, the 3DSpace searches the list of business objects. If the named business object is found, any connections it has are first removed, (so that history is updated on the object on the other ends) and then that object is deleted along with any associated files. If the name is not found, an error message results.

For example:

delete businessobject Person "Cheryl Davis" 0;

After the Delete command is processed, the business object is deleted and any relationships with that object are dissolved. You will receive the MQL prompt for another command.

To remove a checked in file of format ASCII text, enter the following command:

delete businessobject Assembly “Telephone Model 324” AD
   format “ASCII Text”
   file assemble324.doc;

Deletion of files can occur automatically, as well, during a checkin/replace, removal of a business object, move file command, or synchronization of file stores. In a replicated environment, the delete function removes all copies of each file at each location. For more information, see MQL Concepts: Locking and Unlocking a Business Object.

When deleting files from the last object in a revision chain, only the link to the files is deleted. However, when deleting a file/format from a business object that is not the last in a revision chain, the file is first copied to the next object in the revision chain, if a reference to that file exists. This latter case could impact performance.