REMOVE_OBJECT
Use the REMOVE_OBJECT script function to delete an existing object. The deleted object is moved to the Recycle Bin, from where you can restore it if necessary.
Tip: Use the :ON_ERROR script statement to define actions to be taken if the removal fails. For more information, see Script Elements for Error Handling.
Notes:
-
This script function writes all open transactions of the script to the AE database. For more information, see Script Processing.
-
You cannot use REMOVE_OBJECT to delete a folder.
-
Do not use this script function to remove Users, as it does not check if there are active tasks from the User. Use the Automic Web Interface to remove Users.
Syntax
REMOVE_OBJECT (Object Name)
Parameters
- REMOVE_OBJECT
Deletes an existing object - Object Name
Name of the object to be deleted
Format: script literal or script variable
Return codes
-
0
Deletion was successful -
20645
This object does not exist -
20217
This object is currently open for editing purposes -
20369
The object is in the Transport Case
Example
This following example deletes the object "FIRM.CALENDAR2022".
:SET &RET# = REMOVE_OBJECT("FIRM.CALENDAR2022")
See also: