org.mozilla.javascript.EcmaError: Method "ScopedGlideRecord" called on incompatible object.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2015 01:00 PM
In business rule. Check application access for sc_req_item - all on except for delete. This is a second case like that...
org.mozilla.javascript.EcmaError: Method "ScopedGlideRecord" called on incompatible object.
Caused by error in Business Rule:
1: function onAfter(current, previous) {
2:
3: var request = null;
==> 4: var gr = GlideRecord('sc_req_item');
5: gr.addQuery('correlation_id', current.activty_id);
6: gr.addQuery('state', 1);
7: gr.query();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2015 10:52 PM
Hi Alexey,
So from your scope you are querying the system table(sc_req_item) which is in global scope. So in this case rules are limited. Can you please try once using "when is before" in BR and let me know the outcome.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2015 11:07 PM
Same error for both before and async
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2015 11:48 PM
Was missing new before GlideRecord

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2015 11:52 PM
Pefect
Would you mind marking my answer as correct/helpful if this resolves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2019 05:43 PM
4 Years on and still relevant (I was looking straight through this exact same typo in my own code) . . . thank you sooo much