function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDCAdmin73SFDCAdmin73 

Hyperlink to a Visualforce PDF page?

I created a visualforce PDF page on the opportunity object. I am trying to create a hyperlink formual field to this VF page. This field will be used in opportunity reports. 

However when I click on the link, I recieve the following error:

This site can’t be reached
apex’s server DNS address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN


Here is the formula that I have: HYPERLINK("https://apex/WinLossOpportunityReportPDF?Id="+ Id,"Win/Loss Opportunity Report","_parent")

User-added image
What am I doing wrong? I appreciate any help!

Thanks!
 
Best Answer chosen by SFDCAdmin73
Bryan JamesBryan James
Try changing your Hyperlink to HYPERLINK("/apex/WinLossOpportunityReportPDF?Id="+ Id,"Win/Loss Opportunity Report","_parent")
Thus removing the HTTPS:// call at the very front of the URL portion. I believe what is happening is that since you are including it in your current URL it thinks that apex is the domain of a site. when you remove it and just have a single slash in front of the word apex the browser sees the slash and knows that this is a page on the current domain.

All Answers

Bryan JamesBryan James
Try changing your Hyperlink to HYPERLINK("/apex/WinLossOpportunityReportPDF?Id="+ Id,"Win/Loss Opportunity Report","_parent")
Thus removing the HTTPS:// call at the very front of the URL portion. I believe what is happening is that since you are including it in your current URL it thinks that apex is the domain of a site. when you remove it and just have a single slash in front of the word apex the browser sees the slash and knows that this is a page on the current domain.
This was selected as the best answer
SFDCAdmin73SFDCAdmin73
Thanks Bryan! That worked!

Beth