A-1130
πWarning
Always follow naming conventions for page items.
Reason
APEX automatically prefixes items with P{page_id}_. This ensures unique item names across an app and makes it predictable for developers to use them.
Example
Non-Compliant Example
page 3 (
// ...
pageItem FOLDER_NAME (
// ...
)
) | Line | Column | Message |
|---|---|---|
| 3 | 14 |
Compliant Solution - β
β
β
β
β
page 3 (
// ...
pageItem P3_FOLDER_NAME (
// ...
)
) Tests
Test SQL query
select aa.workspace || '.' || aa.alias || '.' || pi.item_name as identifier,
'Item ' || pi.item_name || ' in app ' || aa.alias || ' of ' || aa.workspace
|| ' should be named ' || 'P' || pi.page_id || '_' || pi.item_name || '.' as message
from apex_application_page_items pi
join apex_applications aa on pi.application_id = aa.application_id
and pi.workspace = aa.workspace
where not regexp_like(pi.item_name, '^P' || pi.page_id || '_(.+)$')
and pi.item_name not like '%P' || pi.page_id || '%'
and aa.workspace in (#ApexWorkspaces#)Test results
| Identifier | Message | Migration |
|---|---|---|
| WORKSPACE.CUSTOMERS.FOLDER_NAME | Item FOLDER_NAME of app CUSTOMERS in WORKSPACE should be named P3_FOLDER_NAME. | - |
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-1130
