- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2015 07:39 AM
My coworker is looking to return a GlideRecord of Approvals for a specific type of Catalog Item, and it seems like we can't dot-walk to an extended field.
Here's what doesn't seem to work:
var grApprovals = new GlideRecord('sysapproval_approver');
grApprovals.addQuery('sysapproval.cat_item', '[sys_id of specific Catalog Item]');
I assume it's because sysapproval_approver.sysapproval ("Approval.Approval for") is a reference to the task ("Task") table and cat_item ("Item") is specific to the extended sc_req_item ("Requested Item") table.
To get around this, we then created a second GlideRecord of the Requested Item being approved. Is there a better way?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2015 08:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2015 08:04 AM
try using
sysapproval.ref_sc_req_item.cat_item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2015 09:29 AM
Magic! I'll assume that you can always use "ref_[extended table name]" in order to dot-walk to an extended field, then.
Is there anywhere I should have found that in the Wiki, or is it just a secret?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2015 11:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2015 11:29 AM
Great tip! Thanks!