User Interface¶
TODO(David)
Write this page. Stub created for structure only.
TODO
Lightning apps and pages (FlexiPages), page layouts, compact layouts, quick actions, tabs, themes; volume control and ownership
Standards for user interface metadata: Lightning apps and pages, layouts, actions, and the discipline that keeps high-volume UI metadata reviewable.
Forms¶
TODO(David, 2026-10-08)
Stub, to come back to. From the collected rules (apex-vf-collected-rules memory): the forms decision matrix. Still to weigh: Omnistudio, which Salesforce's guide names for customer-facing forms and the collected rule does not; and the order of preference among the record form components (lightning-record-form, then lightning-record-view-form and lightning-record-edit-form, then a wire adapter), which is in the collected LWC rules and belongs with the JavaScript page.
A form is built with the simplest tool that meets the need, in this order: Dynamic Forms on a Lightning page, then a screen flow, then a screen flow that holds a Lightning Web Component, then a Lightning Web Component on its own. Where the form needs automated unit tests, a Lightning Web Component is the choice (Building Forms, Salesforce Architects).
No rule checks this. Reviewers do.
Lightning Message Channels¶
A Lightning Message Channel is exposed (isExposed is true) only when a component in another namespace has to use it. An exposed channel can be used by components in other namespaces, which in an org means the code of installed packages: they can publish to it and read what is published. An exposed channel blocks the pull request (severity 2) until it is removed or a reviewer confirms that the exposure is intended. Enforced by AvoidLmcIsExposedTrue.
Web Links¶
A web link is a custom button or link on an object. Its URL is deployed with the metadata, to every org.
- A web link does not hold the absolute URL of a Salesforce org. Every sandbox and every production org has a host name of its own, so a link that names one is right in one org only. Use a relative URL. A link to one of the public Salesforce websites is allowed, such as
help.salesforce.comordeveloper.salesforce.com: they are the same for every org. A web link from a namespaced package is not reported, because an org cannot change it. A web link that holds the absolute URL of an org is reported at severity 3. Enforced byNoHardcodedWeblinkURLs. Each organisation adds to the allowed subdomains in the rule'sallowedSubdomainsproperty. The Apex rule that does the same for code is in Apex.
S-Controls¶
An s-control is HTML and JavaScript that the org stores and runs in the browser, from a custom button, a link, or a tab. Visualforce pages supersede s-controls, and an org that has never used them cannot create one (Scontrol).
- No s-control is committed. S-Controls are Tier 0 metadata:
.forceignoreand.gitignoreleave them out, the Tier 0 push ruleset rejects a push with one, and the Prohibited Metadata Check fails a pull request that adds one. An existing s-control is rebuilt as a Visualforce page or a Lightning web component. The metadata file of an s-control blocks the pull request (severity 1). Enforced byAvoidSControlsandProhibitedMetadataType.
Rules¶
The rules that this page mentions. The Standard column gives each rule's standard in one line, and the Section column links to the section that mentions the rule; "Not yet written" marks a rule of this page that no section mentions yet. Appendix F.6 holds the full cross-reference.
| Rule | Kind | Severity | Standard | Section |
|---|---|---|---|---|
Avoid |
Stock Code Analyzer PMD | 1 | No s-control is committed; rebuild it as a Visualforce page or a Lightning web component | S-Controls |
Prohibited |
Custom PMD XPath | 1 | No metadata file of a Tier 0 type is committed to version control | S-Controls |
Avoid |
Stock Code Analyzer PMD | 2 | A Lightning Message Channel is exposed only when a component in another namespace has to use it | Lightning Message Channels |
No |
Custom PMD XPath | 3 | A web link does not hold the absolute URL of a Salesforce org | Web Links |