Allow URLFOR() in Formula Fields to Support Consoles and Communities - Ideas - Salesforce Trailblazer Community
Trailblazer Community

All Ideas

Idea Details

Post an Idea
2,000  Points
Open
Idea has been posted. Give it an upvote or downvote.

Allow URLFOR() in Formula Fields to Support Consoles and Communities

Customization & App Building

Today, there is no way to include a hyperlink inside of a formula field that will work inside of both native Salesforce as well as inside of a Salesforce Community or Console. The underlying for this is the way that Salesforce structures its base URLs inside of these three places:
  • Native Salesforce: https://naX.salesforce.com
  • Console: https://naX.salesforce.com/console/
  • Community: https://mycompany.force.com/communityname/
You can write a relative URL using the following syntax, HYPERLINK("/"&Id, "Click Me") and the formula field will work fine inside of native Salesforce. If you click on the same formula field from inside of a Console, you are taken out of the Console back into the native Salesforce user interface since the relative URL does not grab /console/ from the base hyperlink when it creates the hyperlink. You want to navigate to https://naX.salesforce.com/console/15-digit-id but instead you are taken to https://naX.salesforce.com/15-digit-id 

The same is true for Communities; if you click on the same formula field from inside of a Community, the community name is dropped from the URL and you get an error message since you are taken to an invalid URL. You want to go to  https://mycompany.force.com/communityname/15-digit-id but instead are taken to https://mycompany.force.com/15-digit-id, an invalid URL. If that formula field will only be used inside of that Community and no where else, you can make it work by hardcoding in the Community Name, using HYPERLINK("/communityname/"&Id, "Click Me") but it is less than ideal, especially if you are using a custom domain name in production. 

Custom links and buttons support the use of URLFOR() and $Actions, which will dynamically determine the correct URL for users and allow hyperlinks to work inside of native Salesforce, inside of the Console and inside of a Community. However, formula fields do not support URLFOR() or $Actions, and there is no other way to dynamically determine the base URL. Please either allow URLFOR() inside of formula fields or another way of merging in the users's current base URL so that formula fields containing hyperlinks can work inside the native UI as well as Consoles and Communities! 

Merge Idea · Flag

  • Upvotes
  • Downvotes

Ideas

Apps

from AppExchange

Questions

No results found.

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



 

 

Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


 

Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.