Follow the below steps to add a button to any object: 

  • Setup->Customize->Accounts (OR any object where the button should be added)->Buttons and Links->New
  • Click on the New Button and enter details.
  • Provide the following information on the above screen:
  • Label: Download Attachment (you can change it if required)
  • Name: Download_Attachment (you can change it if required)
  • Description : Optional
  • Display Type: Detail Page Link or Detail Page Button
  • Behavior: Display in existing window without sidebar or header
  • Content Source: URL
  • Formula Editor : /apex/DownloadFiles__MassFileDownload?parentid={!Account.Id}
  • Finally, add the button to the required page layouts of the account (or object for which this button was created) and it's ready for use.

      

For Lightning Mode users, add the button in Lightning Actions also, so you can use it in Lightning.