I have two document Content Types with a Document Template attached.

The Document Template has quick parts (document properties) that reference back to fields in the content type.

We are required to use client side JavaScript to create a new Documents based on the CT and Document Template and fill in the data based on the ID of another list item.

There are some examples of this using workflows instead of JavaScript to auto-populate fields in the DL, CT and Document Template.

We need to write javascript to..

  1. Create a new DL List Item for a specific content type.
  2. Dynamically create and save a new blank Document based on the CT Template.
  3. Update all the fields in the List Item based on the ID of a list item from another list.
  4. When the fields are updated, the document gets auto-filled because the template references fields from the DL/CT.

Is this possible?

  • yes, you have to learn SharePoints JSOM to make it all happen, if you Google on those terms and your requirements (and you know JavaScript) it takes a couple of days (or weeks, depending on your learningskills) learning time to get it all done. – Danny '365CSI' Engelman May 3 '16 at 19:27
  • Please point me to a good url that shows some code samples. – Gilbert May 4 '16 at 11:21
  • Why should I spend 2 minutes doing a Google search you can do yourself in 5 minutes? – Danny '365CSI' Engelman May 4 '16 at 13:06
  • I am using SharePoint 2010. Using client side coding ONLY, I need to dynamically add a new blank word document to a document library based on one of its content types. I have had no success with this so far. Any suggestions other than "it's possible" would be appreciated. SP.FileCreationInformation() will not work in SharePoint 2010. – Gilbert May 6 '16 at 11:36
  • Thanks. I assume from the lack of responses, that this is not feasible in SharePoint 2010. Thanks. – Gilbert May 11 '16 at 11:50

Your Answer

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

Browse other questions tagged or ask your own question.