- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 06:47 AM
Good morning,
I need help with a script.
Vendor records are created in ServiceNow on "core_company" and each night a process runs to sync with our accounting system. I've been asked to provide a link to the newly created record in a new field.
What kind of field would I need to add to be able to do this? URL or String?
The idea is that with this link, we will be able to access ServiceNow from the accounting system quickly.
Here's the script I need.
Table: core_company
When: Before
Insert = True
When record is inserted, add a link to the current record to the record link field.
Hope this makes sense and someone can get a quick "correct answer"
Thanks in advance for the time and help!!!
Carl
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 08:01 AM
Create a before insert business rule and put this code in there
current.<field name>= 'https://'+ gs.getProperty('instance_name') + '.service-now.com/' + current.getTableName() + '.do?sys_id=' + current.sys_id;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 08:01 AM
Create a before insert business rule and put this code in there
current.<field name>= 'https://'+ gs.getProperty('instance_name') + '.service-now.com/' + current.getTableName() + '.do?sys_id=' + current.sys_id;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 08:24 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 08:28 AM
it should be current.u_vendor_link=.......; remove <>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 08:34 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 08:38 AM
You are welcome.