I have created a Custom List, what I need is a simple way to add multiple PDF Forms attached to any newly created List Items.

I have tried to accomplish this with a Work Flow but can't make it work correctly.

Does anyone have a simple way to accomplish this?

  • Event receivers? – Taran Goel Dec 27 '15 at 15:06
  • You can do using sandbox solution or using Remote Event Receivers. Depending on your preference more details can be given. – Prakash - Crow Canyon Dec 27 '15 at 17:26
  • Which would be the easiest to accomplish? I am open to either one as both will be a learning experience for me. Thank you. – ITT4R CORP Dec 28 '15 at 20:37

I have implemented something similar in the past. If looking for a browser based solution (JavaScript), then SPServices may help here. It includes the tools you need to get this done - although depending on how large the PDF files are, it may be inefficient. You would need to code this up, but the design would be:

  • inject JavaScript into the New form that uses the SPServices '$().SPServices.SPRedirectWithID' to redirect the user to a custom ASPX page after the item is created.

  • Create a new blank ASPX page (ex: webpart page) that will be used to attach the files for the newly created list item. This page should receive via URL params the ID of the item that was created (the utility I mentioned before will pass the ID along). This should just show a busy animation to the user along with a progress bar.

The code in this new page, that will attach the documents, should do the following:

  • check if the list item already has the PDF files attached (protects against browser refresh)

  • retrieve the PDF files from a document library as Base64 encoded string. If the files are small and don't change all that often, then as an alternative you can embed them in the new ASPX page as a Base64 string - this avoiding the need to download them.

  • attach the files to the new List item. When it is complete - redirect the user to the List view or some other page indicating "success"

All of the operations above can be achieved using the Sharepoint API using JavaScript and SPServices and would require no server side code to be deployed.

Hope this helps.


you try this way once using Out of the box solution,

Click on add item -> add attachment-> upload the document->submit->again click to add attachment to upload follow the above procedure.

You can do by creation sandbox solutions with adding some of Jquery.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.