Advertisements

Archive

Posts Tagged ‘Download’

Dynamics Portals – Add Download feature to the Forms

September 22, 2019 Leave a comment

In my previous article I’ve explained the Portal styling using Metadata option.

This article is the extension to the styling article, where I will explain how to add ‘Download’ feature to the Form.

I am going to use the ‘Registration’ form as an example, and will see the steps to add a ‘Download’ link to a word document.

Add the Document as a Web File:

  • As a first step, create a new ‘Web File’ and note down the ‘Partial URL’.

Dld_1

  • Next, add the document which you want your Portal user to download from Portal, as a Web File attachment under notes.

Dld_2

Design HTML with Download link:

  • Design the HTML page as per your requirement.
  • For the download link, add a <a> tag with an ID.
  • Add a JScript function, to read the <a> tag by ID and set the web file URL in the document.ready() event.

Dld_5

  • Add the HTML to the Portal entity forms ‘Metadata’ record.

Lab_7

  • Browse the Portal form and you should see the document link, which opens the document on click.

Dld_3

Note:

  • You can only add the allowable file types as the ‘Web File’ attachment.
  • To change the allowable file types, navigate to ‘Settings -> Administration -> System Settings’ and modify in the ‘Set blocked file…‘ field.

Dld_4

🙂

Advertisements