use 'lightning:workspaceAPI' instead of sforce.console.isInConsole() in Aura component
Problem Statement: Resolving Integration Issues in AgreementEditor.cmp
Adobe's requirement for /support/console/52.0/integration.js in the Aura component (AgreementEditor.cmp) is causing an error. While Adobe's code defensively checks for sforce.* before usage, the require statement is failing, triggering a popup error.
Key Issues
- Unsupported Integration: integration.js is not supported inside Aura or LWC components, even when hosted by Visualforce (Lightning Out).
- Navigation Limitations: The removal of sforce.console.isInConsole() eliminates advanced console navigation capabilities.
- Workaround: Using ltng:require to load Adobe's integration.js separately allows the code to function but without enhanced navigation features.
Recommended Solution
- Replace sforce.console.isInConsole() with lightning:workspaceAPI, which is fully supported in Lightning Experience and ensures compatibility.
- Remove Adobe's dependency on integration.js in required scripts.
- Future-proof the implementation by transitioning all Aura and LWC components to lightning:workspaceAPI for tab and subtab management.
