Sometimes during development there is the requirement to “Comment out” a Process, a Validation, … in an Oracle Application Express (APEX) application. To skip a step which doesn’t work anymore, or where a user says he doesn’t need that anymore but where you are sure that next week you are going to add it again…
In Oracle Forms that’s quite simple. You just have to rename the trigger to use underscores (eg. PRE-QUERY to PRE_QUERY) and the trigger doesn’t fire anymore. But how can you do that in Oracle APEX?
Sure you can comment out the PL/SQL code, if it’s a PL/SQL process, but don’t forget the NULL; so that you still have a valid code. But what to do for the more declarative process/validations/branches/…? You could set the “Condition Type” to “Never”, but that will change probably an existing condition. And afterwards when you want to enable it again, you have to know what has been set before.
- Go to Shared Component\Build Options and create a new one with the name “Commented out”.
- Set the Status to “Exclude”
Now you are able to “disable” any object in your Oracle APEX application by assign the new build option with the “Configuration\Build Option” property. This property can be set for almost any object in Oracle APEX.
And the good news is, there is even a report which shows you all the objects which are “Commented Out”. Have a look at the “Utilization” tab in Shared Components\Build Options.