Can Links to Records be Included in a Report

Richard101
Mega Expert

If a user creates a report of a list of changes, can a link to each of those changes be included in the PDF export? Ideally, the change number would be the URL to the record in ServiceNow.

1 ACCEPTED SOLUTION

Mark Stanger
Giga Sage

You cannot change the formatting of the PDF export so this is not possible currently.

Please mark this as the correct answer if I've answered your question.  Thanks!

View solution in original post

7 REPLIES 7

Hi Mark,

 

the solution is as follows. assuming the report for tickets (incident, request, change etc).

create a field on task table with type as url. and in calculated script, have below code.

(function calculatedFieldValue(current) {

// Add your code here
//return ''; // return the calculated value

var url = "https://"+gs.getProperty("instance_name")+".service-now.com/"+current.sys_class_name+".do?sys_id="+current.sys_id;
return url;

})(current);

 

This will work for existing as well as new records. no manual update for existing record or BR is needed.

 

iit gave me report as below in excel.

find_real_file.png

and also if we take pdf export, the link will be clickable.

Hope i am doing correct.

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Ahmmed Ali
Mega Sage

Hello,

 

Not sure if this is best approach, but this can be done with URL field.

 

you will need to create new field of type URL in change table and add calculated script to dynamically create the URL with current sys_id of the record.

 

then this field can be included in the reports. it will give URL to the respective records in SNOW.

even you can create the field in task table so all its extended tables will get this function.

 

This should work in all type of exports.

 

Let me know for any further query.

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Not a bad idea. I will submit an enhancement request to HI to get this as a native feature