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
AgentDealerXAgentDealerX 

Instance Reference for Custom HTML component or Custom Links

We want to make package a custom link and custom html components.  They use releative links.  We will need to use a link which contains the correct SF instance.  

 

The relative link for activity list is href="../007" .  Howvever this will not work if you go to a visual force page.  
I will need to change this to href="https://*(Salesforce Instance)/007".  

 

How would I get the instance without referencing the current page?

 

Is there a global varible which will return the URL can be used with Custom links or Custom HTML components?

 

Thank you in advance for any assistance on this!

Dirk GronertDirk Gronert

May the following articel will help: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_url.htm

 

Account acct = [SELECT Id FROM Account WHERE Name = 'Acme' LIMIT 1];
String fullRecordURL = URL.getSalesforceBaseUrl().toExternalForm() + '/' + acct.Id;

 

Cheers,

--dirk