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

Hello @Alon Grod ,

 

the same thing was mentioned by me yesterday itself no need of using gs property ,OOTB it redirects you to the logged in instance .

 

Great you got the output as expected.

 

Mark Helpful if you find my post relevant.

 

Thanks

Ashley
Kilo Sage

Hi Alon,

 

I hope you're doing well,

 

Have a look at your system properties, you should have one called "instance_name" so you can add:

gs.getProperty('Instance name'); as part of the url i.e. 

 

href="https://"+gs.getProperty('Instance name')+".service-now.com/esc?id=ticket&table=incident&sys_id=209...";

 

Kind Regards

 

Ashley

shivangi k
Kilo Sage

Hi @Alon Grod ,

 

You can use below mentioned function to get instance name dynamically.

gs.getProperty('instance_name')

 

Please mark helpful if it helped you.

 

Regards,