How to create a URL in the Rules Engine

  • 19 December 2019
  • 3 replies
  • 374 views

Userlevel 7
Badge +1

Today’s tutorial covers how to create URLs in the Rules Engine. A good use case for this, as I describe in the video, is if you need to tokenize links to multiple Salesforce records in the CTA comments or scorecard comments. In my example, I tokenize links to two Opportunity Products and then include those in the CTA comments. 

 

 

The guide for how to put these URLs together can be found via this link: 
https://www.w3schools.com/tags/att_a_href.asp. The instructions are to use the concatenate formula field in a transformation task, then put in the following code: 

 

<a href=”  

hit enter

Input your URL - in my case it was https://na85.salesforce.com/

hit enter

Then tokenize whatever it is you want to link to; in my case the opportunity product ID

hit enter

“>

hit enter

Type in the text you want the link to display; in my case “Link to Product”

hit enter

</a>

hit enter and save

 

Let me know if you have any questions! 

 

3 replies

Userlevel 7
Badge +2

Thanks for posting this here!

Userlevel 2
Badge

Hi @spencer_engel is this logic still supposed to work? I know this is a year out of date. I attempted this, but what ends up happening is all the html code gets displayed in the output. When I just concatenate my URL and my tokenized value the URL works, but I would prefer if it didn’t display the entire URL, but rather the text I’d like.

Userlevel 7
Badge +1

Hi @spencer_engel is this logic still supposed to work? I know this is a year out of date. I attempted this, but what ends up happening is all the html code gets displayed in the output. When I just concatenate my URL and my tokenized value the URL works, but I would prefer if it didn’t display the entire URL, but rather the text I’d like.

As far as I know that solution should still work, but I admittedly haven’t tried it for a while. Thinking outside the box, if your concatenated field works, maybe you could do one more transformation on that field and do a case expression with the logic being “if URL starts with HTTP, then transform to a custom string field of (insert text here)”...thoughts?

Reply