Overview:
Admin can configure object page layout to add related documents sections.
From these sections, admins can also add filters to related documents sections using VQL-type expressions to constrain what specific documents appear in those sections for users to select. For example, admins can restrict users from adding related documents that belong to a specific document type.
This VQL works as expected when the user is using English, the documents can display normally.
But once the user is using a language other than English, the already added documents become invisible in the parent object record even to Vault Owners.
Root Cause:
The VQL configured in English is still trying to filter the documents with the English document type, but the document type is translated to the user's language which is not English anymore, hence no documents can be filtered out.
Solution:
Admins can use the TONAME()
function to use the field name when querying document fields.
By default, queries on documents use field labels instead of field names.
The field name stays the same in all languages which can avoid the discrepancy in different languages.
Criteria VQL should be:
TONAME(type__v) = 'type_name__c'
Related Documentation:
Vault Help: Vault Queries