View Attachments by button click

Hi,

Is it possible to put in a button on the tracker view of a dashboard and have it open an Attachment…

I have a serial number dashboard where they can select by job or part and would like to show an attachment (drawing ) for the selected part.
I can do the BAQ portion to have the attachment URL show up – just want to know how I could have them click on a button and have the PDF file display.

1 Like

If you already have the URL showing up,
gridName.DisplayLayout.Bands[0].Columns[“Column_Name”].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL;

1 Like

Also, the user must have Allow Epicor Web Access checked in User Account Maintenance

Thanks, I’ll give that a try - was thinking of a button but could just display the URL as a link…

As for Allow Epicor Web access, we aren’t using Epicor on the web - so not sure if this will work …

I’m not using Epicor on the web either. But Allow Epicor Web Access is an option in the user account which allows the user to open links from within Epicor. If it’s not enabled, they can click on the link and it won’t do anything

1 Like

ok Thanks,

Hi Todd,

I can’t figure out where to put this code –
I tried on my dashboard, it is not available as View Rule, Then tried to add it by deploying the dashboard and using the Wizards / script editor, to no avail… I’m new to coding, actually old, but haven’t done any in decades so this is kind of new to me.
Can you give me some specifics on where / how to insert the code.

Thanks
Wayne

You’ll need to do a customization in order to use that code.

You’ll need to declare a variable to hold the grid. This should be done in the section under script underneath where it says // Add Custom Module Level Variables Here **

EpiUltraGrid grid1;

Underneath the InitializeCustomCode() function you’ll need to add:
this.grid1 = (EpiUltraGrid)csm.GetNativControlReference(“special code here”);

the special code is here:
image

then use the form event wizard to create a form load event and add this in the MaintController_Load section

grid1.DisplayLayout.Bands[0].Columns[“Column_Name”].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL;

with Column_Name being your column name.

I don’t know if this would meet your needs as you specified a button or something to click. I have a couple dashboards that publish the file URL/link from a query and then use the URL/XSLT view to subscribe to that. This means every time they click on a new line it shows the doc. Works fine for us as they are small files, if you are loading large drawings or files imagine it could slow them down so you’re back to a button or link to click.

Hi Todd,

Never mind – I figured out what I had done wrong – All is working great now

THANK YOU !!! :slight_smile:

1 Like