How to export hyperlinks in a report
|Knowledge Article Number||000193908|
While exporting a report, either via the "Printable View" or "Export Details" button, the hyperlink on the case number field is lost and it is visible in plain text. Is there a way to export the report to include the Case Number field with a hyperlink to the case in salesforce. This would help the recipient to click on the link rather than search for the cases manually.
As per the standard functionality of Salesforce, the Record ID column in a report will remove hyperlink when it is exported to Excel. However, you may use one of the following work around to fulfil the requirement.
Workaround 1: Copy and paste the report in excel which will include hyperlinks. This is an easy way but cannot be used always, esp. when the record count is more than 2000. This is because a report will only show the first 2000 rows unless it is exported to excel.
Workaround 2: Create a custom formula field (return type 'Text') with the name "Link to the Record" (or anything that you prefer) on Case Object with the following formula:
"https://instance.salesforce.com/" + Id
In the above formula, replace 'instance' with your Org's Salesforce instance e.g.: NA2, NA15, EU1, AP1 etc. and 'Id' with the Case record Id.
Then add the formula field "Link to the Record" in the report. When you will export this report in a CSV format, it will give you a column (Link to the Record) with the URL of the Salesforce record.
Now you would have to apply your Excel skills to convert this field into hyperlink. You can follow the below mentioned steps:
1. Let's assume that the 'Link to the record' field is available in Column 'A'
2. Insert a column next to the 'Link to the Record' column
3. Leave the first row for row label and insert the following formula in the second row: "=HYPERLINK(A2)" (Where A2 is the first record in 'Link to the record' column)
4. Copy and paste this formula in the rest of the cells in the same column.
The above formula will copy all the values from 'Link to the record' into the new column as hyperlinks to the Salesforce records.