Skip to content

[feat] Flow Scanner: resolve FlowDefinition ID and support FlowRecord pages#1129

Open
CamilleGuillory wants to merge 2 commits into
tprouvot:releaseCandidatefrom
CamilleGuillory:feat/Flow-Scanner--resolve-FlowDefinition-ID-and-support-FlowRecord-pages
Open

[feat] Flow Scanner: resolve FlowDefinition ID and support FlowRecord pages#1129
CamilleGuillory wants to merge 2 commits into
tprouvot:releaseCandidatefrom
CamilleGuillory:feat/Flow-Scanner--resolve-FlowDefinition-ID-and-support-FlowRecord-pages

Conversation

@CamilleGuillory
Copy link
Copy Markdown
Contributor

@CamilleGuillory CamilleGuillory commented Feb 20, 2026

Describe your changes

Resolve FlowDefinition ID (300xxx) to the active Flow version (or latest as fallback) when only a definition ID is available. Support opening Flow Scanner from FlowRecord pages (/lightning/r/FlowRecord/...). Display the analyzed flow version number in the Flow Information card.

Details:

  • Added sanitizeUrlParam() to normalize "null"/"undefined" URL param strings to null
  • Added resolveFlowIds() to handle all ID resolution scenarios (300→301, missing IDs, mixed inputs)
  • Added getDefinitionIdFromFlowVersion() — looks up FlowDefinition from a Flow version via Tooling API
  • Added getFlowVersionFromDefinition() — looks up active (or latest fallback) Flow version from a FlowDefinition
  • Added versionNumber field displayed in the Flow Information card
  • Relaxed URL parameter validation: host is required; at least one of flowDefId or flowId is sufficient
  • Updated getFlowScannerUrl() in popup.js to generate correct URLs for FlowDefinition (300xxx), FlowRecord (2aF...), and Flow version (301xxx) IDs
  • Added FlowRecord ID handler in popup.js to resolve the associated FlowDefinition ID via REST API

Issue ticket number and link

Closes #1127

Checklist before requesting a review

  • I have read and understand the Contributions section
  • My PR relates to an existing issue or feature request and I discussed it with maintainer
  • I used SLDS style and limit the usage of custom CSS
  • I have performed a self-review of my code
  • I ran the unit tests and my PR does not break any tests
  • I documented the changes I've made on the CHANGES.md and followed actual conventions
  • I added a new section on how-to.md (optional)

@tprouvot
Copy link
Copy Markdown
Owner

Thanks @CamilleGuillory
Could you also include the fix for the FlowCompare url ? From FlowRecord it does not work currently

… pages

- Resolve FlowDefinition ID (300xxx) to active/latest Flow version when only that ID is available
- Support opening Flow Scanner from FlowRecord pages (/lightning/r/FlowRecord/...)
- Display the analyzed flow version number in the Flow Information card
- Sanitize URL parameters to handle null/undefined string values gracefully
@CamilleGuillory CamilleGuillory force-pushed the feat/Flow-Scanner--resolve-FlowDefinition-ID-and-support-FlowRecord-pages branch from 2e22f79 to fde6c47 Compare May 5, 2026 14:06
…ion pages

Resolve the active (or latest) Flow version ID in the popup before building
the Flow Compare URL, so the button works when opened from FlowRecord (2aF)
or FlowDefinition (300) pages — not just Flow version (301) pages.
@CamilleGuillory
Copy link
Copy Markdown
Contributor Author

@tprouvot I added the fix for the FlowRecord page

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.

2 participants