Skip to content

Performance and style knowledge: compute Role Center headlines in the background; build client links with GetUrl - #225

Open
Michael Dieringer (MichaelDieringer) wants to merge 1 commit into
microsoft:mainfrom
Curabis:community-contribution/r6-headlines-and-geturl
Open

Michael Dieringer (MichaelDieringer) wants to merge 1 commit into
microsoft:mainfrom
Curabis:community-contribution/r6-headlines-and-geturl

Conversation

@MichaelDieringer

Copy link
Copy Markdown
Contributor

Summary

Two articles, each with good and bad samples that compile.

  • performance/compute-role-center-headlines-in-the-background
    • Rule: a headline added to a Base App Headline RC … page that builds its text by looping over documents or entries should compute in an OnComputeHeadlines subscriber on codeunit 1441 "RC Headlines Executor". The result is stored per user and read on page open.
    • How the executor runs: the job queue runs it as the user who opened the page, at most once an hour per user. It is skipped while an entry for that Role Center is pending, and a failed entry restarts the next day.
    • Visibility: OnIsAnyExtensionHeadlineVisible only ever sets true, following Essential Business Headlines and the AL Guidelines (NAV Design Patterns) article.
    • Own HeadlinePart pages: these have no executor event and should use a page background task instead. Learn notes that part fields show dashes until the tasks complete.
    • Base App counterexample, cited openly: Headline RC A/P Admin loops on open.
    • Not flagged: static text, setup or availability checks (Connectivity Apps), and FlowField or CalcSums aggregates computed once per page instance (Sustainability).
    • Source note: Learn does not document OnComputeHeadlines. The mechanism comes from BCApps source and the AL Guidelines pattern. That pattern's event locations are out of date, and the article says so.
  • style/build-client-links-with-geturl
    • Rule: links into the running environment's client should come from GetUrl, not from a hardcoded host, tenant or environment combined with ?company=/&page=. Learn says GetUrl is based on server configuration and applies the tenant automatically.
    • Not flagged:
      • &filter=, &$filter= or &mode= appended to a GetUrl result
      • another environment's URL read from setup (MDM)
      • fixed endpoints (OAuth landing, Shopify webhook callback)
      • OnPrem-to-online links
      • external URLs
    • Edge cases, both from Learn:
      • an unpublished SOAP/OData object raises a runtime error. The older AL Guidelines pattern says an empty string is returned, so the article points out the discrepancy and follows Learn.
      • UseFilters returns an empty string when the current client type is not one of the listed types.

Wiring

  • Headlines: a targeted cue and tokens in al-performance-review.
  • GetUrl: a high-signal mapping and tokens in al-style-review.
  • Both pairs are registered in the matching review-fixtures overrides.
  • BCApps links are pinned to 837ef80 and AL Guidelines links to 53923c5. The AL Guidelines articles credit David Bastide (headlines) and Mike Borg Cardona and Bogdana Botez (client URLs) at Microsoft Development Center Copenhagen.

Test plan

  • Samples compiled with AL compiler 30.0 against Base Application 28 symbols (0 errors, 0 warnings)
  • validate_frontmatter.py: 0 errors (2 warnings, both in files this PR doesn't touch)
  • Test-KnowledgeIndex.ps1, Test-SkillIndex.ps1, Test-ReviewContract.ps1, Test-KnowledgeRetrieval.ps1
  • Test-ReviewFixtures.ps1, including the -PrepareDirectory deterministic ranking check

🤖 Generated with Claude Code

…ent links with GetUrl

Adds performance/compute-role-center-headlines-in-the-background and
style/build-client-links-with-geturl with good/bad samples, cues in
al-performance-review and al-style-review, and review-fixtures
registrations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant