[SalesForce] Formula field with an hyperlink on the email template

I have a formula field called Search_Quote__c on VM_Sales_Order__c object. The field formula is as follows.

HYPERLINK("_ui/search/ui/UnifiedSearchResults?str="&Quote_No__c, Quote_No__c)

WHen I try to put this field on email template it shows up like a big link

<a href="_ui/search/ui/UnifiedSearchResults?str=Q-62867" target="_blank">Q-62867</a>

and not like a output link. Is there a way I can just show the quote number and not this big link.

Best Answer

Don't use the formula field as it will output as the fill link. Simply do this (HTML, custom Template, or VF):

<a href="_ui/search/ui/UnifiedSearchResults?str={!Quote__c.QuoteNumber}" target="_blank">{!Quote__c.QuoteNumber}</a>

Ensuring you use your correct merge fields. Since the formula field is using values from the object your email merge text just replicates the formula.