Oct 31 2017 04:00 PM - edited Oct 31 2017 04:01 PM
I am really hoping someone can help me, I followed the instructions on the site below to create a custom workflow that creates a subsite whenever an item is added to a specified list.
The workflow works GREAT but WILL NOT create the sub site with the custom template. The guy in the article above does not touch on this very much but from what I've gathered you need the site template GUID. I've tried EVERY possible way to generate this site with the template ID and it isn't working, the site is still created but it's your basic teams site.
Side Note - I'm able to create a subsite with the custom template with no issues if it's done manually.
Please help if you can 😞
Thank you!
Ashley
Nov 01 2017 12:03 AM
Please provide more details!
In the workflow, what is the definition of the variable SiteTemplate and what is the value you are setting it to? Screenshots appreciated 🙂
Kind regards, John
Nov 01 2017 03:36 PM - edited Nov 02 2017 09:29 AM
I've attached a zip file containing both the Custom Project Site .wsp and the Workflow .wsp file, will that help?
Nov 01 2017 11:26 PM
Nov 02 2017 09:08 AM
Hi John,
Screenshots are attached, please let me know if you need any others.
The SiteTemplate variable is setup as a String with the GUID as the Value. This is what my GUID looks like:
{C7FEA85D-0E0B-4B65-A0AB-1C079D37D707}#PMOTemplate
I followed the instructions provided in the article I referenced in my original post. I don't know what I'm doing wrong because everything works perfectly and a site is created, but it isn't created with the template. The article doesn't touch on using a custom template and I'm guessing I'm doing something wrong but am just starting to use SharePoint so I'm not as savy as I'd like to be.
I appreciate your help so far, John!
Ashley
Nov 07 2017 05:58 AM
Hi Ashley,
I created a workflow similar to yours. I'm using a variable to set the guid of the site template (to make it easier to manage updates) but I believe you need to set it as {C7FEA85D-0E0B-4B65-A0AB-1C079D37D707} rather than {C7FEA85D-0E0B-4B65-A0AB-1C079D37D707}#PMOTemplate.
-Karine
Nov 07 2017 07:24 AM
Are you able to show how you created the variable using the GUID?
Thank you so much!
Nov 07 2017 08:09 AM
Hi again,
I just use a local variable (string) set at the beginning of the workflow:
I then use this local variable to set the WebTemplate value in the Parameters dictionary, similar to what is described in the DMC info article you linked to:
The Guid needs to be entered with the curly brackets but without the hashtag and everything that follows. From your screenshots, it seems you are already using a local variable to set the site template GUID, so you should be able to just edit the value in the string builder to remove '#PMOTemplate'.
I can confirm my workflow does use the custom template matching the guid provided when creating the site (tested with different versions of the same template) in SharePoint Online.
Hope that helps!
-Karine
Nov 07 2017 08:50 AM
Hi Karine,
Thank you for the information, I have it setup that way and now the site doesn't create a subsite at all.
I'm wondering if it has anything to do with how the site template was added to SharePoint.
I created the subsite template on a separate site and saved it as a template and then uploaded it to the Solutions on my parent site with the workflow. Could that be the cause of my problem? Is there a specific way I need to add the custom template to my new site so it works properly?
Thank you!!
Ashley
Nov 08 2017 10:00 AM
You said you are able to use the template when creating sites manually? Did you get the GUID from the site where the template is used?
Are both the site you used to create the template and the site you are using the template in located in the same site collection?