Create a URL,which is referring to a record

Shraddha Agrawa
Tera Contributor

Hi All,

 

I have a requirement to create a URL which should hit a particular record of the table.

The catch here is that currently we are having the sys_id of the record in the URL, due to which we are unable to hit the record with the URL as the sys_id of the column is not the correct way to hit it.

 

We need to have a mechanism such that we can pass the front end display value of the record along with the created date in URL so that we can hit the record.

 

Any suggestions how to achieve this would be much appreciated.

 

Thanks

 

 

8 REPLIES 8

I dont think that is possible without a work around. If its a reference field then on the url it will only take sys_id.

Now an not so elegant solution: Create another field on the record and copy the display value of the reference field to this new field. In the URL Navigation use the new string field created.

 

-Anurag

Saurav11
Kilo Patron
Kilo Patron

Hello  Shraddha,

Can you  let me know when you say reference field what exactly do you mean,

A normal record for example Incident can easily be opened using below URL:-

https://Instancename.service-now.com/incident.do?number=Numberoftheincident

But you are saying sys_id can you share some screenshot

Thanks.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Can you share screenshot where you want to include that URL?

Are you including that in email body? or somewhere else

Explain your business requirement.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Saurav/Ankur,

Eg  : you can take a CHG record as it is related to a PROBLEM record

Screenshot: We are to hit a URL for CHG where CHG# is a reference type of field.

 

I am to hit a related list record, having the record id as primary key

I am not to use this URl anywhere but client wants to have a sample URL in which he just wants to change the no. of that record(CHG- referenced record) and hit it. they will then use the URL to paste it manually in an email which they sent to their customer

find_real_file.png