How to create Dynamic links on a form which changes based on incident and loggged in user's data .

Sriharsha Radha
Tera Contributor

Hello,

 

we have a link to a different application that needs to be created on incident preferably visible on workspace which changes according to based on incident field data and logged in user's data. Where can i start to build this.

 

Ex: https://link.tootherapplication.com/WorkNumber=123456&Did=ABCD

In above link 123456 is the work number which is a field on incident table

ABCD is a specific Id of the logged in User. Each user will have different id which needs to be added to link.

 

Multiple users can access the same incident form which will have this link to this application and for each of them, it should work based on their id and the work number from incident.

Business rule cannot work here as this id(ABCD) changes based on the logged in user. How can this be generated?

 

2 REPLIES 2

suvro
Mega Sage
Mega Sage

Have you tried display business rule

 

var userg = new GlideRecord('sys_user');

userg.get(gs.getUserID);

var specificId = userg.getValue('specific_id_field');

var url = 'https://link.tootherapplication.com/WorkNumber='+current.work_number_field+'&Did='+specificId ;

How to user this url variable to display as a link on the form level in a html field as a hyper link?

Eg: 123456 should be linked with above url got from the business rule