Question

Trigger client script from hyperlink

  • 7 August 2023
  • 5 replies
  • 62 views

Userlevel 4
Badge +9
  • Sidekick (Partner)
  • 59 replies

Hi Experts,

I have a requirement of triggering an integration upon clicking a hyperlink. The only way I could think of going about this is by attaching a client script to a text field and setting the lookup navigation of that field such that it shows a hyperlink.

For example:
 


and the client script is attached as following,



the above setup yields in a hyperlink, but clicking on this doesn’t trigger the client script



I tried various configurations for the lookup navigation, and my observation was that whenever the Trigger is set as hyperlink, client scripts don’t get triggered.

The only way I could get the client script to trigger was with the following setup,
 


but the flipside is, this doesn’t yield a hypelink anymore,
 


So this is where I  am at. Any ideas on how to get the desired requirement working? is it possible at all?

P.S I saw a similar question raised here which is still unanswered


5 replies

Userlevel 6
Badge +26

Hey @Miraj 

The closest I managed to achieve is a double click functionality.

Hyperlink look + One click will not trigger the script.

This is a bit problematic from user experience I guess.

 

Cheers!

Userlevel 4
Badge +9

@Shneor Cheshin interesting.

Can you show the configuration for the double click setup? (does this also work  with a field on the header level?)
 

 

Userlevel 6
Badge +26

Hey @Miraj 

Now, when I think of this, not sure if double click is availble on a regular field.

On the filed right click and configure lookup settings

 

 

 

If you right click the row header

You will have a double click event option

 

Cheers!

Userlevel 4
Badge +9

@Shneor Cheshin Thanks.

In this ticket which is kind of similar to this, you have answered as following,
 

2 options I can suggest:

  1. Create a “regular” field and set it’s URL with a business rule or client script.
  2. Create a client script and set the URL dynamically. Set the script on any event you wish.


I’m curious about the 1st option. Is it possible to set the URL dynamically for a regular field with a B.R or client script?

and by url, did you mean this
 


​​​​​​​or this?

 


 

Userlevel 6
Badge +26

Hi @Miraj 

Nither of those.

I ment the URL in the client script

var taskId = getControlValue('task','task_id');
var url = 'https://mysite.com/' + taskId
launchBrowser(url);

Cheers!

Reply