web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to create a "download file" link in EP

(0) ShareShare
ReportReport
Posted on by 400

In our AX 4.0 environment we've got a customization on our EP which provides original document scans as PDF files available for download, via a custom field which identifies the network path of the file. Providing the file to the user is done through the .layout() method on the WebForm for the EP page using the following code:

    if (custInvoiceJour.CustomFileField)
    {
        link.menufunction(new WebUrlMenuFunction(weburlitemstr(EPDocuGet)));
        link.record(custInvoiceJour);
        link.parm("ImageFile");
 
        html += '<a href="';
        html += link.url();
        html += '" border=0>';
        html += '<img align="middle" border=0 alt="'+"@SYS12229"+'" style="margin-left: 2; margin-right: 2"  src="' + WebImageWeblet::ImageRunSource('WebIcon_Document') + '">';
        html += '</a>';
    }
    webSession().writeTxt(html);

In my new 2012 environment I would like to implement a similar customization, providing a link to the files in a similar fashion, but instead of using a WebForm the page is now being deployed as a ListPage using the "Deploy to EP" feature. The ListPage template doesn't allow adding code in quite the same way, so I've got an Action MenuItem linked through the ActionPane, and pointing to a class which I would like to initiate the download. So when a user has a row selected and clicks on the button that triggers this MenuItem (and therefore the class) the file download will begin. 

Is there a way to accomplish file downloading in this way, or is there a better way to allow local resources to be downloaded?

Thanks!

 

Dan

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    have U found any solution? I've got the same problem.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans