DeleteScenarios() macro added

The DeleteScenarios macro of the System type is added, providing automation for the maintenance of temporary or unpublished scenarios, reducing data storage.

For example, DeleteScenarios(Cycle, [Cycle Period], [Scenario], [Module])

Cycle is the only required parameter. If the scenario is not populated, all unpublished scenarios are deleted. A check ensures one scenario is Published. If not, no scenarios are deleted from this Cycle Period, and a message is reported in the audit log.

If Cycle Period is not populated, all cycle periods with a status of Completed are deleted along with relevant scenarios.

If the scenario parameter is populated, all scenarios within the name and the context of the Cycle, Cycle Period and module are targeted for deletion. If any of the targeted scenarios cannot be deleted due to the status being set to published, the macro fails. If any of the scenarios identified for deletion are not available, the macro fails.

Note: This feature is available on upgrade. You are not required a new role or privilege access to use this feature.