UI Action form Button to redirect to a different url

Alon Grod
Tera Expert

Hi,

 

I need to create a new form button on the incident table named 'open chat'. This button will be available only if the login user's email starts with the letter 't'.  When clicking on the button, needs to redirect to this url:

https://hi.services/direct/ + gs.getUser().getEmail() + '.com'

 

How can I achieve that? What should I put in the script section and the condition section?

 

1 ACCEPTED SOLUTION

Prince Arora
Tera Sage

@Alon Grod ,

 

Can you try this:

UI action : Server

 

PRINCE_ARORA_0-1680416860006.png

 

Condition:

(((gs.getUserName()).toString()).startsWith('t'))+"" == "true"

 

Script:

action.setRedirectURL("https://hi.services/direct/" + gs.getUser().getEmail() + '.com'); 

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact!

View solution in original post

3 REPLIES 3

Prince Arora
Tera Sage

@Alon Grod ,

 

Can you try this:

UI action : Server

 

PRINCE_ARORA_0-1680416860006.png

 

Condition:

(((gs.getUserName()).toString()).startsWith('t'))+"" == "true"

 

Script:

action.setRedirectURL("https://hi.services/direct/" + gs.getUser().getEmail() + '.com'); 

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact!

@Prince Arora hi can you please write the condition with gs.getUser().getEmail() instead of gs.getUserName()

@Alon Grod 

 

Can you try this:

 

(((gs.getUser().getEmail()).toString()).startsWith('t'))+"" == "true"

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.