SyntaxThis command lets you duplicate a business object’s defining clauses and change some of the values at the same time. While grants are not a defining clause, when business objects are copied, any and all grants are also copied to the new object. You cannot revoke the accesses within the copy businessobject command. You might first view the object’s contents using the Print Businessobject commands described in Print Business Object. Then you can use the Copy Businessobject clauses listed below to modify the values you want to change. You should recognize these clauses since they are the same in the Add Businessobject command.
Any of these values can be changed as you copy the business object. You only need to include clauses for the values that you want to change. If you do not make any changes, the values remain the same as the original business object with the new name you have assigned. Handling FilesIf you want to clone an object without including the original files in the new object, use the following syntax:
The placement of the
Since files are included by default, include the
Including HistoryBy default, when a new object is created with the copy command (or using the Studio Customization Toolkit or GUI), the only history record it has is similar to: history = create - user: creator time: Mon Sep 12, 2005 10:28:58 PM EDT state: one revisioned from: T1 1 0 To include the history of the original object in MQL, use:
After copying the history records from the original object to the cloned object, the additional create history record will be appended indicating that it is a copy (revisioned from), as shown above. Since the command is intended for use within a program object, it is up to the calling program to handle any errors. |