Skip to Main Content
Feature Request FR-5035
Product Area Developer Experience
Status OPEN

1 Voters

Run Remote Server PL/SQL Code with Every Request

anton nielsen Public
· Sep 28 2026

Idea Summary
Remote Server definitions have Advanced > PL/SQL Code that can return p_config that can change the Endpoint URL. This code should run with every request. The current implementation caches the result using a combination of Application ID and  Oracle Database Session (and possibly other things). The caching algorithm is not documented and it is not even documented that there is a caching algorithm. Furthermore, the scenario described in the item help is not possible to implement:

The code below is for an application that implements multi-tenancy and supports different variations of Endpoint URL for the tenants.

This indicates that it should, at a minimum, cache per tenant (APP_TENANT_ID), but it does not. It appears to only cache by APP_ID and database session. Caching by database session seems just silly.

Use Case
It is possible that my Endpoint URL will change based upon any number of things: APP_ID, APP_USER, APP_TENANT_ID, time of day, day of week, current sign of the zodiac. It is impossible for the APEX engine to know under what circumstance it should cache this or even if I want to run something else before each call. This PL/SQL block should run for every call.

Preferred Solution (Optional)
I understand that you may not want to change the existing behavior for current applications. If this is the case, add an additional Advanced element “Cache Results”. This could default to TRUE for existing applications. The help for this item could include “Cache the results of this code via the old undocumented caching algorithm.”  ;)

This idea is open.