My LWC has a datatable that receives data from an external service and populates that table. I need the email address in the email column to be a link that when clicked opens the contact record for that email address on a separate page. I'm not sure if there are built in functionalities that makes this a straight forward task, I've been looking in the developer guide here: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/reference_lightning_ui_api_record but I can't find a way to do this. My thoughts are to send the email back to and apex class and get the contact ID for that email address but then I'm not sure if this is how it should be done the LWC way and also how would I then open that contact record in a new tab? I have to add that I'm very new to LWC. Thank you for your help!
First you need to retrieve the contact Ids for the different records using Apex. Then, you need to implement a clickable row in your lightning-datatable, take a look at this recipe. In the recipe it's the account name what I make clickable, but you can adapt it to be the email.
To open the link in a new tab, modify the usage I'm doing of the navigation service by what's suggested in this question.