The Situation: We need to reference a non Salesforce-Object in Chatter Posts, regardless of the Client Software (Mobile Browser / Salesforce App / Desktop Browser). The Ressource we want to reference is not part of the Salesforce-Universe as an Custom Object, but there are identified by an unique Id.
Background: The Ressource is a document, which we dont't want to be part of Salesforce Files and we don't want to transfer the document through the Salesforce Server.
We have an own Package installed which is able to access these Id by calling our own Service REST Endpoint using JS (Third Party Service - not part of Salesforce).
The Idea is to use Links. We could directly address the third party REST Service, BUT: Authorization.
- If the user has no valid Session-Cookie the call will not be processed
- Salesforce-App: Links are oppened in an clear Browser Popup, which never has a valid Session-Cookie. The Salesforce-App does not share Cookies with this Browser.
Our Solution (Idea): Using Link to an Lightning Page with a Apex Controller, which manipulates the Lightning-Page (including JS which will generate a Session-Cookie if necessary). The Lightning Page will then access the Third Party Ressource (also using JS).
Is there any better Idea?