Delete method: PortalRegistry class
Syntax
Delete(RegistryName)
Description
The Delete method deletes the PortalRegistry from the database, including any data and tables.
WARNING:
If you delete a PortalRegistry, you delete everything. Your entire PortalRegistry is gone, all the folders, content references, templates, and so on. Do not delete a PortalRegistry object unless you are absolutely certain that you want to.
Note:
The portal registry classes execute some methods "interactively", that is, as they happen. The item won't be marked for deletion, then actually deleted later. The item is deleted from the database as soon as the method is executed.
The Delete method can only be used with a closed registry, it cannot be used on an open registry. Before you use the Delete method, you must explicitly close the PortalRegistry object (with the Close method.) The Delete method returns False if you try to delete an open PortalRegistry object.
Parameters
| Parameter | Description |
|---|---|
|
RegistryName |
The name of the registry to delete. This parameter takes a string value. If you specify a registry that doesn't exist, this method returns a False value. |
Returns
A Boolean value: True if the PortalRegistry object is successfully deleted, False otherwise.
Example
The following example deletes all PortalRegistry objects that start with HRMS_99.
Local ApiObject &MySession;
Local ApiObject &MyPortal;
&MySession = %Session;
&MyPortal = &MySession.GetPortalRegistry();
&MyPortal.Delete("HRMS_99");