REMOVE_OBJECT

Script Function: Deletes an existing object.

Syntax

REMOVE_OBJECT (Object Name)

Syntax

Description/Format

Object Name

Name of the object that should be deleted.
Format: script literal or script variable

Note: REMOVE_OBJECT cannot be used to delete a folder.


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.

A deleted object is moved to the Recycle Bin and can be restored afterward.

Tip: Use the :ON_ERROR script statement to define action to take if the removal fails. For more information, see Script Elements for Error Handling.

Note: The script statement causes all open transactions of the script to be written to the AE database. For more information, see Script Processing.

Example

This following example deletes the object "FIRM.CALENDAR2003".

:SET &RET# = REMOVE_OBJECT("FIRM.CALENDAR2003")

See also:

seealso

Script Elements for Handling Tasks