Get the system id of an instance?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 08:26 AM
I am trying to fetch a system ID for a survey result ID, right now I am getting an static ID in the result and then look up the that ID in the service now survey results options, is there any way to get that link of the survey results directly, right now I am using this:
var html = '<a href="' + gs.getProperty('glide.servlet.uri') + 'nav_to.do?uri=' + current.getTableName() + '.do?sys_id=' + current.sys_id + '" target="blank">' + current.number + '</a>';
but the current.sys_id is giving me the sys_id of the current instance not the instance in which the result is stored.
Any suggestions will be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2016 09:56 AM
Hi Abhinav,
Where are you executing the code snippet above? What is the scope of "current"? Are you able to share a little more context around what you're trying to achieve?
Thanks,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2016 11:03 AM
Hi Alex,
I was able to resolve the issue, I was used the reference and got the system ID. Which I needed.
Thanks,
Abhinav