Hello Sean,
I recently also had this problem, however, with the help of Kentico support, I used this to retrieve a list of all the attachments of a field for the current page.
List<Guid> guidList = new List<Guid>();
Guid attachmentGroupguid = Guid.Empty;
DataClassInfo dci = DataClassInfoProvider.GetDataClass("CodeNameOfDocumentType");
if (dci != null)
{
FormInfo fi = new FormInfo(dci.ClassFormDefinition);
FormFieldInfo ffi = fi.GetFormField("FieldName");
attachmentGroupguid = ffi.Guid;
}
AttachmentManager am = new AttachmentManager();
DataSet ds = am.GetAttachments("AttachmentGroupGUID = '" + attachmentGroupguid.ToString() + "' AND AttachmentDocumentID = '" + CMSContext.CurrentDocument.DocumentID + "'", "AttachmentOrder", false);
Please let me know if this is satisfactory.
Regards,
dvanbale