How to dot walk to the Document ID field on Approval table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 08:58 AM
After enabling 'Invalid Query' system property in our instance, the addQuery('document_id.xxx',"=", sys_id) is not working.
Log: 'document_id.xxx' not found in table 'sysapproval_approver'.
Any idea how to fix this issue?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 09:08 AM
From my experience, dot-walking from document ID field does not always work. I think I've seen it work in background scripts, but not in email scripts.
I suggest you get the document id value and perform another glide query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 09:46 AM
Document ID fields cannot be dot-walked. Can at most be retrieved (one by one) using the getRefRecord method of a GlideElement.
You have to use the addJoinQuery method of GlideRecord or the RLQUERY or SUBQUERY* operators in the encoded query.
*) undocumented - basically does a join in encoded queries