anusha(salesforce developer)

Monday, 22 August 2016

Hyperlink in Excel file in salesforce

Out-of-the-box, a lookup field in Salesforce report is click-able, such as: you can click Account Name in Opportunity report, it will bring user to Account page layout.

But, when the report export into Excel file, the link is gone. Can we make the link stay? Yes, here we go:

1. Create a Formula Field

  • Set the formula field return type = Text
  • Formula field: HYPERLINK("https://xxx.salesforce.com/"& Id , "Click me", "_self") - change xxx with your Salesforce instance, e.g.: ap1, na1, na6, etc
  • Do not need to show this formula field in any page layout
  • Make the field visible only to profile needed.

2. Add Formula Field into Report

3. Printable View
Instead of using 'Export Details' button, advise user to use 'Printable View' button. User can delete the header and footer is not needed in Ms Excel.

This may be not the best solution, but it works with simplest effort.

Salesforce report:



Microsoft Excel:


No comments:

Post a Comment