A-0980 Try to set the compatibility mode to the latest version.
Reason
The compatibility mode keeps an upgraded application on the runtime behavior of an older APEX release. Behavior changes that a release ties to its compatibility mode stay switched off until the mode is raised, so an old mode quietly accumulates technical debt.
Raise the application's Compatibility Mode (Application Definition > Properties) to the latest version and retest the application; the APEX release notes list what changes per mode. Keep an older mode only temporarily, while the changed behavior is being adapted.
Example
Non-Compliant Example
app CUSTOMERS (
// ...
runtime {
compatibilityMode: 24.2
}
) | Line | Column | Message |
|---|---|---|
| 4 | 9 |
Compliant Solution - ★★★★★
app CUSTOMERS (
// ...
runtime {
// no compatibilityMode: the latest applies
}
) Tests
Test SQL query
with
release as (
select substr(version_no, 1, instr(version_no, '.', 1, 2) - 1) as apex_version
from apex_release
), latest as (
select case when apex_version in ('26.1', '26.2') then '26.1'
when apex_version in ('24.2') then '24.2'
when apex_version in ('21.2', '22.1', '22.2', '23.1', '23.2', '24.1') then '21.2'
when apex_version in ('19.2', '20.1', '20.2', '21.1') then '19.2'
when apex_version in ('19.1') then '19.1'
when apex_version in ('5.1', '18.1', '18.2') then '5.1'
end as newest_mode
from release
)
select aa.workspace || '.' || aa.alias as identifier,
'App ' || aa.alias || ' in ' || aa.workspace || ' runs in compatibility mode ' || aa.compatibility_mode
|| ' instead of ' || latest.newest_mode || '.' as message
from apex_applications aa
cross join latest
where aa.workspace in (#ApexWorkspaces#)
and aa.compatibility_mode != latest.newest_modeTest results
| Identifier | Message | Migration |
|---|---|---|
| WORKSPACE.CUSTOMERS | App CUSTOMERS in WORKSPACE runs in compatibility mode 24.2 instead of 26.1. | - |
Parameters
Use parameters to customize the rule to your needs.
| Parameter | Description | Default Value |
|---|---|---|
| ApexWorkspaces | Comma-separated List of APEX workspaces owning APEX applications to check. | dblinter, dbl_gui |
References
- same as UC-0980