- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2017 03:12 PM
We have a basic record producer that creates incidents. It has worked fine in CMS.
We are currently working on upgrading from Helsinki Patch 11b to Jakarta patch 4 and transitioning from CMS to Service Portal at the same time.
What we have found is that our record producer still works fine in CMS, but in Service Portal, it generates the below error:
"Function getUser is not allowed in scope sn_sc".
Anyone ever seen anything like this before?
I have no catalog client scripts associated with this record producer.
Thanks,
- James
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2017 03:32 PM
Found it,.. inside the record producer, there was an associated template "New Incident" which defaulted certain fields of the generated incident.
I was setting the location to "javascript:gs.getUser().getLocation()";
Once I removed this the error dissapeared.
Seems like service portal somehow doesnt support this while CMS does.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2017 03:17 PM
Looks like others may have run into similar issues with the record producer in Jakarta / Service Portal:
https://community.servicenow.com/message/1211552#1211552

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2017 03:20 PM
Hi James,
I was getting the same error with another function a few weeks ago - there are some global functions you cannot use from within another scoped application - in my example I was trying to use a getdatetime in the 'HR Core' scoped app, which isn't allowed. I found an article on this below - but as the WIKI has been archived can't access it:
A quick search showed another promising link:
Apologies i haven't got an exact fix for you as i haven't had this error myself!
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2017 03:24 PM
Thanks Carl.
The strange thing though is that we dont have any reference to getUser. At least none that I can find..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2017 03:30 PM
Hi James,
That's weird, have you checked the table (or base table) business rules/client scripts instead of just the Catalog client scripts? There might be something i there that's causing the issue. I've found sometime adding the 'script' field to the list view and then searching for a keyword (n your case *getuser) could help to find any entries of this in all the items in the list... this has helped narrow things down for me in the past.. hope it helps!