Creating a Link to a SF record in a table

I’m trying to combine two fields in a table to save screen space. Currently I have 2 fields - Product and Billed Product.

Product is just a text field with the product name - which is useful/needed on this screen.
Billed Product is just the auto-incrementing Name field that contains the link to the record. The LINK is needed, but not the “B-{00001}” value that is displayed.

So what I want is a template field that displays the Product Name, but is a hyperlink to the Billed Product record.
Here is what I have in the Template field:

<a href={{Billed_Products_Mo__r.Id}}>{{Monthly_Bill_Product__c}}</a>

This is close to working, except the linked URL is including “/apex” in the url and when I click the link, it takes me to SF Classic and a page that says the “URL No Longer Exists”

https://mycompany– - URL that breaks
https://mycompany– - correct URL that I’m trying to create


<a href= “https://mycompany –{{{Billed_Products_Mo__r.Id}}}”>{{Monthly_Bill_Product__c}}

Thank you. I had tried something similar to this before, but it wasn’t working.

Triple curly brackets strip the meta formatting and gives you just the raw data. That is useful for cases like this.


It’s better to use relative links here:

<a href="/{{{OurLookupField__c}}}">{{{OurLookupField__r.Name}}}</a>

Just in case your org’s domain changes somehow.

1 Like