How can I programmatically get the ‘Comments’ of a file attached to an entity.
I’ve tried several different ways but the ‘Comments’ field always returns empty.
I can get the files with the following code:
UploadFileMaintenance uploadFileMaintenance = PXGraph.CreateInstance<UploadFileMaintenance>();
var files = PXNoteAttribute.GetFileNotes(Base.Message.Cache, email);
I tried this to get the comment:
string comment = uploadFileMaintenance.GetFileComment(file.Name) ?? string.Empty;
Also this:
string comment = file.Comment ?? string.Empty;
Nothing seems to work.