We’ve already used conditional rich text boxes, showing certain alerts depending on products. However, when working with a client this week, they are using Rich Text to replace the old classic “links” box that was always there on the left. Only issue here is that we have create the rich text component on every page if you want it to always show, but there’s also some flexibility in that (maybe you only want it on the home page and not the account pages like it always showed up before — good and bad I guess).
So before I go further, quick shout out to Josh here for this tip. Again, he gave me the idea, ping him and thank him if this helps a bit. The bad news is that I was trying to do this with a custom link (i.e., Google Search) and it doesn’t seem to work in lightning. Boo!
First thing first, on an account page, click the GEAR, then “Edit page” to get to the designer.
Then, drag the rich text component from the left, put it where you want on the right (I went upper side). We’re going to use the “link” element as an option here.
Now highlight the word, click the link icon to open the link options.
Now, for the URL I’m just going to use a standard URL (google.com or something like that). This is where intranet links and other things are fantastic. I’m thinking you can also do mapped drives (//file: type of URL’s). Paste that in the URL box.
Next, click the target tab (essentially just the ability to open in the same window, a new window, etc. I say a new window here, it’s easier (true web folks will know more here).
Now we’ve got a link…. Frankly, I was really hoping to get this done on an account record with a dynamic link – can’t do it, can’t figure out how yet (I think it’s an Apex thing). In the comments, if you know how please let me know! As for the use of this, this could really work well on the home page I bet, like I said before, replacing our old “announcements” and custom link areas.
For complex URLs have you thought of using Flow Components to augment the rich text component?
This is a great idea. I’ve only done flows lightly, maybe I will do this next month!
I’m trying to build a TOC on a Knowledge Base article. How do I designate the target for the links?
Are the pages that you’re looking for on the same web document? If so, and you just want to place targets, you would use “anchors” in HTML. Place the anchor on the document, then your URL in salesforce would go to the anchor directly. That’s what I would do if your KB article is one long document.
Is this only in Classic and not Lightning? When I click the link button in the Rich Text component it only gives a field to enter the URL. There are no tabs for Link Info or Target, and I’m trying to prevent links on the home tab from opening in new browser tabs instead of Salesforce tabs.
Unfortunately it looks like they removed that feature and you can no longer choose. By default (this documentation) it will open a new window. https://dreamevent.secure.force.com/articleView?id=sf.fields_using_rich_text_area.htm&type=5