How to dot walk to the Document ID field on Approval table

Sabitha Asir
Tera Contributor

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? 

 

 

 

 

2 REPLIES 2

AnirudhKumar
Mega Sage
Mega Sage

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

-O-
Kilo Patron
Kilo Patron

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