DocStar (ECM) File Attachments in Dashboard

Hi Everyone,

I’m pretty new to Epicor so please bear with me.

I recently got a request to make a new Dashboard which allows users to quickly see attachments on Service Calls. We have ECM (Docstar) hosted by Epicor (as well as Epicor itself).

I’m hoping to have a dashboard in which a Grid View publishes the document information and then a URL/XSLT View which subscribes and shows the selected document.

I was looking at this post and what I’m looking for seems possible, but I’m having difficultly building the URL string. I don’t know what it’s supposed to look like.

Has anyone else done this before? I’m open to any other solutions for quickly viewing documents through a dashboard as well.

Thank you,

Joe, I just used some different code on here the other day to build a button that downloads the attachment from docstar.

-The “view in docstar” functionality I haven’t tried yet.

If you want to review it we can. I am also working on something similar at the moment.

Hi utaylor,

That would be great! Do you use the BO Ice.Proxy.BO.Attachment and method DocStarDownloadFile? I’d be really curious to how this could be put into a dashboard.


1 Like

yeah, I used this:


And referenced this post as well: How to call DocStarDownload Attachment - #8 by Moe

Not sure how you may do it in a cloud environment, might have to do it based on rest call.

I did some work on this before as well - ECM Direct links to documents (not forms) - ECM - Epicor User Help Forum (

If you can get the BAQ to pull back the XfileAttach/XFileRef entries, you should be able to make the URLs work.


Thank you guys! I’m going to look through everything and do some testing. I’ll let you know what I figure out.
@MikeGross, your documentation looks especially promising! Thanks!


Thanks Mike, not sure why I didn’t stumble upon that few days ago.

First off, @MikeGross, your documentation is great. Thank you again!

I played around with the URL approach and I’ve got it kind of working. Unfortunately, I don’t have access to the ECM SQL database and I’m not having any luck finding document ID anywhere else. I had hoped it was in XFileRef.XFileName or XFileAttch.ForeignSysRowID but neither of those GUIDs are working with the ID search. I finally got it working on a Title search, but that introduces some issues when there’s more than one document with the same title.

I went ahead and tried to implement the solution @utaylor outlined, but I ran into an issue there too. I keep getting the error below:
Which is coming from this code I pulled from Moe (mentioned above).

I did a little digging and found this post C# Customization Error After Upgrade - #3 by KevinK. Now I’m thinking Moe’s solution isn’t going to work in version I think utaylor is right and I’m probably going to have to figure out the Rest call.

Has anyone else encountered this error before?

Thanks again!

Don’t have docstar, but looking at the threads don’t see any impediments to doing that in
the cloud.


full transparency I have no clue how client customization works in the cloud on kinetic in browser.

It looks like the person is using classic forms though which must mean they have a smart client.

I just wasn’t sure if all the dlls that are needed to do the customization were available when you’re hosted.

But yeah if they got that far I am pretty sure they have what they need.

I could try and help you @jhanegraaf I just made the customization on a couple forms to download the attachment and present it using code from Jose and snippets from others.


Okay, so I was really close! Ended up figuring out the issue from this post.

The problem was indeed that line I highlighted before, but it just needed a tweak and I did not have to go through the Rest API.
This code from Moe’s solution:
Needed to be changed to this:

After that I was able to download files directly from a button I made through a customization in the Dashboard.

Thank you guys for the help! I’m really impressed by all the responsiveness here, seems like a great community!


I realized I missed something in the documents I created. (I’m glad you liked them!)

Use this query to find the ECM Document GUID to be used in BAQs and Dashboards where you want to display the URL created above in order to allow for direct linking.

select top 100 xfilerefnum, xfilename, left(xfilename, 36) as ECM_Document_Guid, XFileDesc
from ice.XFileRef where doctypeid='APINV' order by XFileRefNum desc

I alienate all my friends and family so I can hang out here with these idgits.

I’d say so.