Post

2 followers Follow
0
Avatar

Using the GetHyperlink and GetCustomActionURL together in a statement

How can I write a statement with the GetHyperlink function and GetCustomActionURL. Below is an example I have that works in our sandbox under the Validation Rule "Admin Project Closure Validation 1.0", but I don't want to run an IF statement, rather use the GetHyperlink function like I have in the past and have the output be the CA URL (e.g. - {GetHyperlink('project', $SYSID)})

{If(IsNull($C_TotalServicesRevenueLive),"<li><b><u>"+hyperlink(GetCustomActionUrl('Admin Project Closure',GetRuntimeParameter(CurrentObject())),"-->Click here to run Admin Project Closure<--")+"</u></b></li>","")}

Matt Bures Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Hello Matthew,

GetCustomActionURL returns an URL, and GetHyperlink does more than just creating the HTML syntax, so I suggest you create the link in HTML directly. 

So, for example, if you want to define a link in HTML format, you can use something like:

<a href="{GetCustomActionUrl('Admin Project Closure',GetRuntimeParameter(CurrentObject()))}">Click here to run Admin Project Closure</a>

As you already use HTML tags, I suppose you are writing an HTML page (or email) from a Workflow rule, so I'll suppose you're familiar with HTML syntax.

I hope this helps

Armand BOLMONT 0 votes
Comment actions Permalink
0
Avatar

Thanks Armand!  Such an easy fix and I didn't even think about using HTML to show the hyperlink even after using it to format the output.  Rookie mistake. It worked perfectly.

Matt Bures 0 votes
Comment actions Permalink