Why is field not found when running script from within a scope?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2017 10:32 AM
I run the script below from the Background Scripts module with the scope set to "global" and I have no issues. However, if I switch the scope to another scoped application, I get the error "field name 'product.u_development_offering' not found in table 'rm_story'".
Why is this and how can I run a script from within a scope and access this u_development_offering field?
A few of other notes:
- The u_development_offering field is a custom field added to the cmdb_application_product_model table
- I do not get this error when changing "u_development_offering" to be an out-of-the-box field on that same table, like "name" or "short_description"
- I cannot see any system log messages and this script did not generate a cross-scope access record (so assuming cross-scope access is not an issue)
var gr = new GlideRecord("rm_story");
gr.addQuery("state", "2");
gr.addQuery("product.u_development_offering", "Self Service");
gr.query();
while (gr.next()) {
gs.info("story: " + gr.number + ": " + gr.product.name);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2017 10:48 AM
Huh. That's really strange, then.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 08:54 AM
Did you ever find a solution to this problem? I'm facing the same issue...