- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2015 03:46 PM
Hi! I'm on Fuji, trying to access data from a custom table to use in a scheduled job, and I keep getting the following in my system log:
org.mozilla.javascript.EcmaError: "user_credentials" is not defined.
Caused by error in <refname> at line 6
3: function pollNetScaler() {
4: gs.log('Start poll');
5: var user_credentials = new GlideRecord('u_custom_credentials');
==> 6: user_credentials.query();
I replaced my custom table with a vanilla system table- sys_user- but got the same result. I'm running the scheduled job a myself (and I have the admin role). What might I be missing here? How can I access table data?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2015 11:04 AM
I do see them, yes! And that line gives me the object type of netscale_use- which I see was from a previous iteration of this script, and I see that I DID make a typo in my variables previously, which leads to this. Auuugh! I'm a fool.
Thanks, everyone, for your responses! It helped me look at this in a bunch of different, helpful ways.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2015 08:51 AM
If you go to your navigation and type in u_custom_credentials.list (no return), do you see records?
Can you explain this line: gs.log("made a gliderecord, type " + typeof netscale_user,"BROOKS"); what is 'typeof netscale_user,"BROOKS"'? I would comment out that line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2015 11:04 AM
I do see them, yes! And that line gives me the object type of netscale_use- which I see was from a previous iteration of this script, and I see that I DID make a typo in my variables previously, which leads to this. Auuugh! I'm a fool.
Thanks, everyone, for your responses! It helped me look at this in a bunch of different, helpful ways.