The CreatorCon Call for Content is officially open! Get started here.

How to add current instance + dynamic field to href link

Alon Grod
Tera Expert

Hi,

 

I have an email notification on the incident table with a button when clicked it should send to the portal. 

 

current link (without dynamic instance and dynamic sys_id):

href="http://68.513.116.115:22222/esc?id=ticket&table=incident&sys_id=2097213cc8fc211020d26a4e3d8eeb6f"

 

required link (need to adjust syntax):

current logged in user instance + /esc?id=ticket&table=incident&sys_id= + dynamic field sys_id ${sys_id}

 

how can i achieve that?

 

1 ACCEPTED SOLUTION

@Alon Grod 

 

you can only put this "/esc?id=ticket&table=incident&sys_id= + dynamic field sys_id ${sys_id}" in your source code and check whether that is working fine or not?

 

If not then recommending you to use the email script, that the place where you can play with this links building activity.

 

Thanks !

View solution in original post

18 REPLIES 18

Basheer
Mega Sage

Hi @Alon Grod 

var instanceURL = gs.getProperty('glide.servlet.uri');//this property has the url for your instance
var url = instanceURL+"/esc?id=ticket&table=incident&sys_id=" + dynamic field sys_id ${sys_id}
You can use this url variable in your href

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

@Basheer 

hi but im not using email script im using the source code option.

AlonGrod_0-1675264688522.png

 

 

Shashank_18
Mega Guru

Hi Alon,

 

use below code:

href = gs.getProperty('glide.servlet.uri')+ /esc?id=ticket&table=incident&sys_id= + dynamic field sys_id ${sys_id}

This property "gs.getProperty('glide.servlet.uri')" holds the value of URI which will be your instance name.

 

Hope this will resolve your issue.

Thanks !