A place for Sharepoint and rantings
Archive for November, 2009
WSS Problem with Provisioning
Nov 24th
Been having a problem with SiteProvisioningProvider. Well I haven’t but apparently it causes problems down the line if things are not done in a specific order.
A nice man at microsoft diagnosed the problem and came up with the code you should run to ensure your not messing up the Web.
Here is a posting of the proposed solution to the bug we found (I don’t care if they don’t think its a bug, not sure if they do or don’t but I do!)
http://blogs.msdn.com/joerg_sinemus/archive/2009/11/24/overwriting-spwebprovisioningprovider-provision.aspx
WSS, Workflow, Who Actually approved this ?
Nov 5th
So I like many have a workflow that takes requests for Sites with a bunch of details for costing etc. Then when approved those Sites are created and permissions allocated.
What we did not have was a record of who actually approved the sites. Whilst this info is in the workflow history after a while that information gets purged, leaving us with Sites that were approved but by whom we know not.
So this is a simple case of changing the workflow and recording all of the approvers in the SPWeb properties, except that the approvers as we can tell happen to be Sharepoint Groups or AD groups, neither of which contain a history of membership, if AD does none I know how to access and certainly not easy for the customer and in a large membership we still would not know who actually did the deed.
I dug and dug for this and eventually found the User Login that actually did the change and here is how.
In your workflow you need a “Workflow Action” of EventName “OnTaskChanged”, this object in the code behind, when Invoked contains AfterProperties,
string user = OnApprovalTaskChanged.AfterProperties.ExtendedProperties[new Guid("d31655d1-1d5b-4511-95a1-7a09e9b75bf2")].ToString();
The above statement gets the User Login frmo the ExtendedProperties Collection. It More >