- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2015 12:08 PM
Hey all,
for some reason, all of a sudden I am getting an error on form load:
Why does ServiceNow run UI actions on form load? Especially when it is a "close" action. I just want to view the record, not action it.
Here are the details on the UI action
Any advice?
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2015 12:10 PM
I think it's because you have the "Client" box checked and you are using "current" in the script. On the client side, "current" is not a valid reference to an object. You would have to use g_form.getUniqueValue() on the client side which should output the equivalent of current.sys_id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2015 12:10 PM
I think it's because you have the "Client" box checked and you are using "current" in the script. On the client side, "current" is not a valid reference to an object. You would have to use g_form.getUniqueValue() on the client side which should output the equivalent of current.sys_id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2015 12:25 PM
Add your server side query to a new function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2015 01:36 PM
Ken,
Thanks! I removed the Client side indicator and the error was resolved, well done!
Quick question again, can you read from Watch_list like this?
var watch = g_form.getValue(watch_list);
//Trigger the event to trigger notification and pass all the users
gs.eventQueue("VIT.ehs.submission", current, watch);
Or is there something I am missing.