On the Bills and Adjustments page (others too), the Files indicator in the top right hand corner between Activities and Notifications displays the number of files attached. How do i get that number.
I've been playing with the following code, but it seems way overkill...i feel like there is probably a simple way to get it.
protected void getFiles()
{
var projectCache = Base.Caches[typeof(PMProject)];
Guid[] files = PXNoteAttribute.GetFileNotes(projectCache, projectCache.Current);
foreach (Guid fileID in files)
{
var fm = new PX.SM.UploadFileMaintenance();
PX.SM.FileInfo fi = fm.GetFileWithNoData(fileID);
}
}