A-0990 Always name buttons in uppercase.
Reason
A button's Name becomes the REQUEST value that page submits and server-side conditions test. REQUEST comparisons are case-sensitive, so a consistent upper-case convention (for example SAVE, DELETE) avoids subtle bugs where a condition like REQUEST = 'SAVE' silently fails to match a button named Save.
Rename the button so its Name is upper case, and update any REQUEST comparisons that referenced the old name.
Example
Non-Compliant Example
page 10 (
// ...
button save (
buttonName: Save
label: Save
// ...
)
) | Line | Column | Message |
|---|---|---|
| 4 | 21 |
Compliant Solution - ★★★★★
page 10 (
// ...
button save (
buttonName: SAVE
label: Save
// ...
)
) Tests
Test SQL query
select aa.workspace || '.' || aa.alias || '.' || bt.page_id || '.' || bt.button_name as identifier,
'Button ' || bt.button_name || ' in page ' || bt.page_id
|| ' of app ' || aa.alias || ' in ' || aa.workspace
|| ' is not upper case.' as message
from apex_application_page_buttons bt
join apex_applications aa
on aa.application_id = bt.application_id
and aa.workspace = bt.workspace
where bt.button_name != upper(bt.button_name)
and aa.workspace in (#ApexWorkspaces#)Test results
| Identifier | Message | Migration |
|---|---|---|
| WORKSPACE.CUSTOMERS.10.Save | Button Save in page 10 of app CUSTOMERS in WORKSPACE is not upper case. | - |
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-0990