Creating Hyperlink for change number

Malaya
Giga Expert

While using table "Change_request" below line works to create hyperlink to a change number to redirect it to change details when clicked

template.print(" <a href='" + baseUrl + gr.getLink() + "'>" + gr.getValue('chg_number') + "</a>");

What changes to I need make if I am using table "u_changes_and_tasks"?

Thanks,

Malaya

1 REPLY 1

HugoFirst
Kilo Sage

To be honest with you, I've not used the function, getlink.


But after reading about it at this link:


http://wiki.servicenow.com/index.php?title=Scoped_GlideRecord_API_Reference#getLink.28Boolean_nostac...



I would think that your code would work regardless of the table.   As long as the 'gr' object is a GLideRecord.