update site settings

  • 23 December 2015
  • 6 replies
  • 0 views

Badge +1

I would like to be able to create sandboxes for my users without requiring any IT involvement, such that they can quickly stand up an area for them to experiment in, do their experiment, and then make the area go away. That way, their "proper" sites can remain focused on the purpose for which they were created, in accord with governance principles, but they can have somewhere to "play".

I have created a list into which the users can enter a request for a sandbox, a workflow to trigger automatically on creation of an entry into that list which uses the "create site" action to create a site, and created a site policy that will close and delete the site after 14 days. What I can't figure out is which action can be used to put the site policy in effect in the Site settings | site closure and deletion setting for the site such that it automatically gets tidied up. Without that, people will start using the sandbox for production data, and governance goes out of the window!

Does anyone know if it is possible to use a workflow to update site settings of this kind? When I do a search for any permutation of Nintex and site settings, I get lots of guidance on how to configure site settings such that Nintex can be run on the site, but nothing on how Nintex can be used to impact on the values in site settings.


6 replies

Badge +11

Hi Frank,

not completely sure if there is a out of the box web service provided by SharePoint to realize this, i couldn't find one right now. However, you can write your own web service to execute all the logic you need e. g. using server object model. In your workflow you can then use the Call web service action to execute this method of your web service.

If you need assistance creating a custom web service, you can find it here: Step by Step Procedures to create a WCF Service Application for SharePoint 2013 - SharePoint Pals or here: Walkthrough: Creating a Custom ASP.NET (ASMX) Web Service in SharePoint 2010 – Rob Windsor's Weblog  or just fight yourself through the MS-Documentation.

Another possibility to change site settings via workflow is to execute a powershell script. Unfortunately the only action i know that executes powershell scripts is a commercial custom action. I don't want to advertise, so if you are intrested just look for something like "execute powershell nintex action" with your favorite search engine, you will surely find something really quick.

Good luck!

Philipp

Badge +1

Hello Phillip

 

Thanks ever so much for the reply and for looking into this item so exhaustively!

 

I spoke about it with my team members yesterday based on our suspicions about setting features using Nintex, and someone came up with a good suggestion which works around the lack of the ability to automatically set a site deletion feature using Nintex.

 

They suggested that, instead of using the inbuilt site closure / deletion feature, we should use a site workflow which iterates through the list of sandboxes in place, finds those which have been in place over three weeks and sends a reminder to tell owners that the sandbox will be removed in one weeks’ time, and then deletes those which are found to be over four weeks old. That way, we don’t have to worry about setting the feature in a workflow, about people “cheating” by manually over-riding the feature, and getting custom web services in place – a good result all around!

 

Again, thanks very much for your help and confirming our suspicions about what can be done with features.

 

Best Regards

 

Frank

 

Frank McCormack

Technical Lead, Knowledge Management & Collaboration COE

M +44 (0) 7557 741765 | www.covance.com

Covance Laboratories Limited

Otley Road, Harrogate, North Yorkshire, HG3 1PY, UK

Badge +11

Hi Frank,

really no problem at all. Like to hear that it seems like you found a solution that - quite frankly - is propably even better (or at least less complex) than anything I suggested silly.png

Best Regards

Philipp

Badge +1

Hi

I suspect this was not aimed at me but rather at Phillip Lucas, given that is the name in your message. When I click on “Actions”, I see

So I can’t confirm it as a best answer, sorry.

Regards

Frank

Frank McCormack

Technical Lead, Knowledge Management & Collaboration COE

M +44 (0) 7557 741765 | www.covance.com

Covance Laboratories Limited

Otley Road, Harrogate, North Yorkshire, HG3 1PY, UK

Badge +11

Well, I thought it would be rather the requesters responsibility (or a mods) to decide which is the best (or "correct") answer. However, if I click on the "Actions" control I can only decide to edit or delete my post but not mark it as the correct answer.

Am I missing something?

Badge +1

Found it – I needed to log in and then I was allowed to flag it as correct answer

Frank McCormack

Technical Lead, Knowledge Management & Collaboration COE

M +44 (0) 7557 741765 | www.covance.com

Covance Laboratories Limited

Otley Road, Harrogate, North Yorkshire, HG3 1PY, UK

Reply