Thanks Brenden!
I did at one point try to use:
{% foreach (relatedResource in CurrentDocument.RelatedDocuments["namespace.CodeName_FieldGUID"].WithAllData) {
ApplyTransformation(Documents.Where("DocumentGUID='"+relatedResource.DocumentGUID+"'").FirstItem, relatedResource.ClassName + ".Thumbnail")
} %}
But the Documents.Where("DocumentGUID='"+relatedResource.DocumentGUID+"'").FirstItem
portion just returns null
, even though the relatedResource.DocumentGUID
appears to be the correct value in some other output testing I did. Is this the wrong kind of document query to get the document object?