Share point Workflow 2010 Document Creation from Template File - sharepoint

We have created a workflow on a List that creates a new document in a specific document library based on a template file. We would like to add automation so that a user could choose the template file that they would like to use when "running" the workflow.
We have searched around and found many tutorials on document creation, but none where you selected the template you wanted to use.
Any help?

You can do that with Content type. You can link a template to a content type. So Create X content type on your list (X = number of your template file) and link template file to content type.
to sum up :
Enable content type on your document Lib
Create a Content type on your list
Upload and Link template file to your content type
When create new document, choose your content type to change the template file

Related

Content Type Not Updated docx,xlsx,pptx in SharePoint

SharePoint library items has document has (.docx, .xlsx, .pptx) extension and item associated with custom content type(Blank word document, Document). When user tries to change custom content type to OOTB content type(Document). It’s not updating even there is no error.
Steps to Reproduce:
1.Create a custom content type that parent as "Document".
2.Associate the content type into the document library and add "content types" to All documents view.
3.When library items has document has (.docx,.xlsx,.pptx) extension and item associated with custom content type.
4.Now try to change custom content type to OOTB "Document" content type and vice-versa.
5.It’s not updating even there is no error.
Please help on this i faced this issue only in (.docx,.xlsx,.pptx) extensions.
Thanks,
Rajendhiran M
Which SharePoint version are you using? May be you can monitor/check SPLogs while updating the content type.

New document gets wrong content type

Within a site collection "x" I have got a document library which contains multiple content types. Each content type is managed at site collection level and has a .dotx template file assigned to it.
The .dotx file should be adjustable within SharePoint so it is stored within a document library in de root site collection. The template file has got the content type Document assigned to it.
When I want to create a new document in the document library in site collection "x" I click on New and select the content type for my document.
Let's say I clicked content type "Document A". Word opens and in the document information panel I see the correct content type "Document A" and the columns associated with it. When I save my document all goes well.
Now I want to create a document with content type "Document B". I click on New and select content type "Document B". When Word opens and I look in my document information panel I see that the content type again is "Document A". The columns in my document information panel are also the columns assiocated with content type "Document A".
It doesn't mather which content type I pick, every document gets content type "Document A" assigned to it.
Anyone experienced the same behaviour before and knows how to fix this issue?
Document templates will carry a lot of xml data with them and sometimes it won't get overwritten. You can see them when using word:
File --> Info: Inspect Document --> Check for issues: Inspect Document
You will see what data this document carries within.
And you can delete this information also in this view.
Remove that data and upload template for the content type again.
Save the dotx file as your desired content type, then your new document will be the same content type as the dotx file. So you wll need to add your content types to the library where you are storing your dotx template files.

RenderingTemplate for ListForm Type

I created a custom RenderingTemplate "viewInventory" copy of ListForm
rendering template. It looks like below. Then I associated the
Rendering Template to a content type (this is list type content type)
EditFormTemplateName. But it seems the list is not even using this
controltemplate because I put a vogus name for editformtemplatename
and sharepoint did not complaint about it.
This exact scenario works for document renderingtemplate. Go figure.
Because you have set Inherits="True" in your content type definition, SharePoint ignores your XmlDocuments section when the solution is deployed, therefore your content type after deployment has no reference to your custom form templates.
Set Inherits to FALSE..
All I had to do is to associate "viewInventory" with both NewFormTemplateName and EditFormTemplateName of the content type through Sharepoint Manager 2007. (or you could do it feature attributes)

Access List items in hidden "Forms" folder using Lists.GetListItems

Is it possible to access the list items in the (hidden) "Forms" subfolder of a document library using the Lists.GetListItems web service method? I need to set the content type of uploaded document templates using Lists.UpdateListItems, otherwise, document created from these templates will have the 'Document' content type and not the content type the template had been assigned to.
Lists.UpdateListItems works in subfolders of the "Forms"' folder, but I need the ows_UniqueId of the list item that represents the uploaded file, and I can only get it using List.GetListItems.
Is there maybe another method of uploading files to SharePoint document libraries, in which you can set the content type?
List.GetListItems expects you to pass it a view, if you don't it uses the defaults view. So what you need to do is create a seperate view which lists all items, and make this view list flat (not listing by subfolder).
Then query against this view.
Does this suck? Yes. Does SharePoint suck? I'll let you answer that question. I didn't write sharepoint, just telling you the way it is.
I don't understand the relationship between the content type of an uploaded document in a document library and the elements in the Forms subfolder.
What I'd try:
- Use Copy Web Service, method CopyIntoItems to upload the file, setting some properties, including the content type.
- Use Lists.GetListItems, with a CAM query specifying the file name and asking for ows_UniqueID property

Export a SharePoint Custom Content Type That Inherits from Contact to Outlook

I've created a custom content type that inherits from the built in Contact content type in WSS 3.0. When I create a list instance and assign my custom content type, there is no "Connect to Outlook" option like there would be if an end user created a new "Contact" directly. Am I doing something wrong or is this a limitation of SharePoint?
The relevant part of my feature looks like this:
<ContentType
ID="0x010600C4945CA38AAB46cdA161C4146965F0E3"
Any help would be greatly appreciated.
The "connect to Outlook" is a function of the list, not the content type. I.e. you can have multiple content types for a Contact list, but you will need to create a list based on a Contact list to get the additional features you require.
For a test to see what I mean, create a contact list, go to the advanced settings for the list and Allow management of content types. Add your custom content type and remove the default contact.
Now for giggles, delete your custom content type and add the Announcement content type. You will still be able to "Connect to Outlook".
Hopefully that demonstrates that the content type is mainly about the fields available to the listitem stored as that particular content type.

Resources