rules repository

A-0730

πŸ†“
Info

Always give an alias to pages.

APEX_APPLICATION_PAGESAll APEX versions β€’ Check and SQL-based Test

Reason

A Page Alias is a unique alphanumeric identifier for a page. It appears in the browser URL path to provide a descriptive location. If none is set, the page ID is used instead.

Example

Non-Compliant Example

page 1 (
    name: Home
    // ...
)
Issues
LineColumnMessage
16Missing alias for page 1.

Compliant Solution - β˜…β˜…β˜…β˜…β˜…

page 1 (
    name: Home
    alias: HOME
    // ...
)

Tests

Test SQL query

select aa.workspace || '.' || aa.alias || '.' || ap.page_id as identifier,
       'Missing page alias in page ' || ap.page_id || ' of app ' 
       || aa.alias || ' in ' || aa.workspace || '.' as message
  from apex_application_pages ap
  join apex_applications aa
    on aa.application_id = ap.application_id 
       and aa.workspace = ap.workspace
 where ap.page_alias is null
   and ap.page_id != 0
   and aa.workspace in (#ApexWorkspaces#)

Test results

IdentifierMessageMigration
WORKSPACE.CUSTOMERS.1Missing page alias in page 1 of app CUSTOMERS in WORKSPACE.-

Parameters

Use parameters to customize the rule to your needs.

ParameterDescriptionDefault Value
ApexWorkspacesComma-separated List of APEX workspaces owning APEX applications to check.dblinter, dbl_gui

References