How to generate the link ??

KM SN
Tera Expert
The below code not producing the link instead it is pasting as it is in the url. Let me have your thoughts on it if possible?

var
sysId = fd_data.trigger.current.sys_id;

var url = "Click the following to view the Change record " + '<a href="' + gs.getProperty('instance_name') + '/nav_to.do?uri=' + 'change_request' + '.do?sys_id=' + sysId + '">' ';

return '[code]' +  url + ['/code'];
2 ACCEPTED SOLUTIONS

Hi @KM SN , 

Use fd_data.trigger:

  • When working with Flow Designer, the fd_data.trigger object holds the information related to the event that triggered the flow.
  • This is particularly useful when you want to access specific data or variables that were passed into the flow at the time it was triggered.
  • Access Current Variables:

    • To access the current variables in the flow, you use the context provided by fd_data.trigger. This allows you to interact with the data that triggered the flow, such as records or specific field values

 

var baseUrl = gs.getProperty('glide.servlet.uri');

/* The sys_id for the record you want to link to */
var sysid=fd_data.trigger.current.sys_id;

/* Construct the URL to the specific record */
var link = baseUrl + 'nav_to.do?uri=change_request.do?sys_id=' + sysid;

/* Output the constructed link */
return '<a href="'+link+'">'+fd_data.trigger.current.number+'</a>' ;

 

Mark as Helpful if is works

View solution in original post

It feels like the integration isn't transferring the link in the way you expect, because it is generated in ServiceNow as clickable link with the number as display value. You may need to configure this in Jira.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

View solution in original post

17 REPLIES 17

Hi @KM SN , 
You are able to Generate a link to  Jira from Servicenow ,
can I know how further I can Help You with this.

If my Solution is Helpful , Please mark it as Helpful

Thanks Regards 
Badri

 

as seen in the below the link should append to change number instead of total URL. I hope this clear what I am expecting. BTW I am trying to generate this link not to use in notification but to populate in Jira comments.

 

ManiHouse1_2-1725003492490.png

 

 

 

 

It feels like the integration isn't transferring the link in the way you expect, because it is generated in ServiceNow as clickable link with the number as display value. You may need to configure this in Jira.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark