function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ben10Ben10 

Link to open record in Gmail lightning extension (clients:availableForMailAppAppPage)

Hi all, 

I recently posted this (https://developer.salesforce.com/forums?id=9060G0000005Q8bQAE) about the need to surface Related Accounts for linking emails when an org has Contacts to Multiple Accounts enabled.

I've been chipping away at this and have landed on a slightly less elegant solution where a list of Related Accounts is srufaced, with each then having a link to display that account record in the pane, and from there a user can click the linking button.

I have managed to show all the accounts (see screenshot below - not very pretty yet). But I am struggling to get the link to work. The link, when clicked, should open the record within the sidebar extension, the same way that clicking any of the other record links from standard components works.

I tried just a basic link like https://cs6.lightning.force.com/one/one.app?#/sObject/0015D00000APVs4QAH/view but this just loads a blank page within the sidebar. The other standard component links look like they are using javascript of some kind. 

I've tried finding documentation on how to create a link to view a record, but couldn't find anything.

Does anyone know how to do this or where there is some documentation on it?

Thanks

User-added image