We have a form which is used for requesting leave. We were asked to put a cancel button on it so that the requester could cancel their request if it has not been approved yet. This would need to cancel any attached workflows. The approval workflow is a standard SharePoint approval workflow.
The workflow is based around a task assigned to an approver in the workflow.
This task would be created by Start Approval Process in the workflow.
Unfortunately SharePoint does not provide a good solution for deleting this.
You could write an event handler but that’s hard to manage.
You could show users how to manually cancel workflows but that’s too complicated for some users.
You could create some whacky workflows that manage themselves but that’s too messy.
In the form create a status field. This field will have the following possible values: pending, cancelled, approved, rejected.
When a user cancels the leave request by clicking cancel in the form, we will update the status of the form to be cancelled. There will still be a task assigned to the approver that needs to be cancelled.
change the behaviour of the task
to check when the status field in the form changes to anything but pending.
Once it changes you can End Task Process to cancel the task.
After spending 3 days trying to work out why columns wouldn’t appear after being promoted from InfoPath, we finally resolved it today. This form had been previously working but the client decided they wanted more fields promoted.
The bad news is that it kind of solved itself. All I did was go back to basics and republish the form. Although I was told that we had tried this many times I just did it again on my pc. Previously it had been published from another pc. The columns appeared in the content type created by this form.
I then had to manually add the columns to the list from existing columns in that content type.
There are many people online complaining about having this issue but I can’t find anyone who can suggest a good answer. My suggestion is to try and republish your form until it works.
One way to go about "resolving" this problem is to delete the columns and then re-publish your InfoPath form.
Delete columns using PowerShell in SharePoint 2011. Get the PS script for deleting columns from this blog. After you run this script you can delete specific columns with the command: Delete-WorkflowColumn -webURL http://portal -listName "Documents" -columnName "Column Name"
function Delete-WorkflowColumn ($webURL, $listName, $columnName)
#Setup variables from the user input
$web = Get-SPWeb $webURL
$list = $web.Lists[$listName]
$column = $list.Fields[$columnName]
#Make sure the column is not hidden or read only
$column.Hidden = $false
$column.ReadOnlyField = $false
#Delete column and dispose of the web object
write-host "Deleted column"
Now re-publish your InfoPath form.
The new InfoPath columns will appear with correct settings.
There is a bit of information around about upgrading from MOSS to SharePoint 2010 and from WSS to Foundation Server but not a lot about upgrading from WSS to SharePoint 2010 Enterprise.
I just did the upgrade and I can’t believe how easy it is. The only caveat was that my WSS was pretty vanilla and only had a few lists and doc libraries. I don’t guarantee this will work for everyone.
I just followed these steps.
- Back up your content database
- Install SharePoint 2010 but don’t set up a site collection
- Restore your content DB
- Use the Mount-SPContentDatabase command using powershell. The exact instructions for this can be found here. *
- Once the upgrade is complete your site will look like the WSS but you can use the Visual Upgrade from Site Actions to give it the new SP 2010 look.
*If you have never used Powershell before see some gotchas I wrote about here.
After 2 days I finally managed to install SharePoint 2010 with a local account.
I ended up working from these 3 articles:
The rest I had to guess.
In Summary here is what I did
- Changed registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS\ServerRole == SINGLESERVER
- Used PowerShell command "New-SPConfigurationDatabase"
Step 1 should fix the local account problem
Note: After changing the registry you may have to reboot.
Step2 is to create the configuration database.
Before running Powershell make sure you have installed version 2 and you mahe to uninstall version 1 from features.
The reason I had to use the powershell command was because I was getting the following error during install:
CryptographicException: Keyset does not exist
It basically died during step 2 of the SharePoint 2010 products Configuration Wizard.
As I had never used powershell before there were a couple of gotchas.
1. At first I was running the wrong version of Powershell. You need to run the modules version.
2. At first I was getting an invalid credentials error. The trick was to run powershell with elevated privileges.
After completing these steps you should be able to run the SharePoint 2010 products Configuration Wizard successfully.
This week we set up Kerberos for a client. There are plenty of articles and blogs on how to do it so instead of writing another one I’ll just focus on what I believe will save you hours if not days if you are doing it for the first time. Namely how to avoid some gotchas.
- Firstly the article with the best step by step instructions was this. - http://technet.microsoft.com/en-us/library/cc263449.aspx
- As the Technet article does, get SQL working with Kerberos first before doing anything else.
- Don’t guess the SPN’s. You will end up with a mess. Keep a record of which SPN’s you set so you can reverse them. Keep them all in one script.
- Know your setspn commands
- setspn – a (add)
- setspn – d (delete)
- setspn – l (list)
- If you can’t debug Kerberos you will struggle. You NEED these tools & don’t be afraid to use them.
Wireshark, - http://www.wireshark.org/
ldifde & setspn - Windows 2003 resource kit
and some scripts I’ll mention in a sec.
The most common problems you can encounter with Kerberos are as follows:
1. Non-synchronized time on servers
Kerberos depends on time and if time on servers is different, Kerberos authentication will fail.
How to find out:
Run WireShark utility, start a packet capture and set the packet filter to the „kerberos“ expression. You should see a packet with error code KRB_AP_ERR_SKEW.
Synchronize time on all servers with AD server time.
2. Duplicate or missing SPNs
If you have multiple service accounts of one class (i.e. HTTP, MSSQLSvc) registered for one IP address or SPN wasn’t registered at all, Kerberos authentication will fail.
How to find out:
Run WireShark utility, start a packet capture and set the packet filter to the „kerberos“ expression. You should see a packet with error code KDC_ERR_C_PRINCIPAL_UNKNOWN or KDC_ERR_PRINCIPAL_NOT_UNIQUE.
On AD server use the ldifde.exe utility to find out the duplicate SPN.
ldifde -f c:\[output file name] -t 3268 -d "" -l servicePrincipalName -r "(servicePrincipalName=HTTP/[server name]*)" -p subtree
ldifde -f c:\spn_out.txt -t 3268 -d "" -l servicePrincipalName -r "(servicePrincipalName=HTTP/my-moss-server*)" -p subtree
3. Response too big packet
On some Windows servers system you can encounter a problem with UDP packet overflow that can result in the authentication failure.
How to find out:
Run WireShark utility, start a packet capture and set the packet filter to the „kerberos“ expression. You should see a packet with error code KRB_ERR_RESPONSE_TOO_BIG.
1. Start Registry Editor (Regedt32.exe).
2. Locate and then click the following key in the registry:
3. On the Edit menu, click Add Key, and then add the following registry key:
Key name: Parameters
4. On the Edit menu, click Add Value, and then add the following registry value:
Value name: MaxTokenSize Type: REG_DWORD
5. Quit Registry Editor.
1. Open the web application for which you enabled Kerberos and monitor the server’s security logs in event viewer for errors. Remember, if Kerberos doesn’t function properly the server falls back to NTLM.
2. Run the following SQL query on SQL server. You can see which services use Kerberos or NTLM authentication.
SELECT login_name, program_name, host_name, auth_scheme
FROM sys.dm_exec_connections C INNER JOIN sys.dm_exec_sessions S
ON C.session_id = S.session_id
3. Add an RSS webpart onto site homepage and use a list on subsite as the RSS source URL. If the RSS webpart displays RSS feeds then Kerberos authentication is working. RSS feeds from subsites do not work in MOSS without Kerberos.
Hope that saves someone time. Good luck with your Kerberos config!!!
I have recently used MySiteCreate 1.0 Production from Community Kit for SharePoint to apply a new Master page to MySites.
You can visit CodePlex to download MySiteCreate feature:
This feature site template associate new features and functionality to existing templates.
Two features involved in the process:
o "Staplee" feature: This feature contains the functionality that you want to add to an existing site template.
o "Stapler" feature: This feature contains the "FeatureSiteTemplateAssociation" XML tags which bind the Staplee feature to a particular site template. Basically, it’s a feature that says “for all Personal Sites provisioned henceforth, they shall have the staplee feature.”
This solution worked beautifully in a SharePoint website we did for a client.
Step 1: Copy the Feature to Features folder:
Copy MySiteStaplee and MySiteStapler folders to corresponding feature folder in 12 hive:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\
Step 2: MySite setup default master page.
Create a new customised Master page with the look and feel that will be applied to MySites.
I started with the top Site Collection Master page, taken from SharePoint Designer, then I have applied the new layout to this page. I saved this page under MySiteStaplee feature folder (default.master).
Change MySiteStaplee/feature.xml to the location of your default master file:
<Property Key="MasterName" Value="default.master"/>
Note that if you copy the Master file using SharePoint designer it inserts some unwanted characters, the best solution is to copy the content (ctrl c) and paste (ctrl v) into the new Master file.
Step 3: Run installation and activation for MySiteStaplee and MySiteStapler features:
· Install and activate the MySiteStaplee feature by running Install.bat; it uses the installfeature and activatefeature switches with stsadm to do so. When you activate it, do so to the web application that hosts MySites.
· Add the two assemblies that were created (the feature activation assembly and the custom ASP.NET web part assembly) to the Global Assembly Cache.
· Add the following SafeControl entry to the web.config for the web application that hosts My Sites:
<SafeControl Assembly="MySiteCreatePart, Version=184.108.40.206, Culture=neutral, PublicKeyToken=cb1bdc5f7817b18b" Namespace="Microsoft.IW" TypeName="*" Safe="True" AllowRemoteDesigner="True" />
Step 4: Create MySite for a user:
Click MySite and view the created MySite using new master pages.
If something went wrong then MySite will not show, this may be because your Master page may be corrupted. You can always delete MySite using either actions (below) then update the Master file and create new MySite:
Go to the URL for Mysite: http://sharepoint.com/personal/me/_layout/settings.aspx
Run the Command: stsadm -o deletesite –url http://sharepoint.com/personal/me/default.aspx
After setting up the people search in MOSS I was getting duplicate results.
The problem was that I had indexed people in Central Admin as well as Shared Services.
The answer is to only index the Shared services using sps3://servername:[ssp port] and not the central admin site.
Remember use sps3 for indexing people and also remember that Soylent Green is people.
MOSS does not allow you to set a default custom theme to your sites upon creation. The most painful example is in mysites. There are articles that give you the full detail on how to get around this but here is the quick and easy way thanks to our good friend Scot Hillier and his SharePoint 2007 Features on Codeplex.
Download Themechanger from http://www.codeplex.com/features/Release/ProjectReleases.aspx?ReleaseId=2502
Install it on server
Find both WSP files and deploy.
Edit the Feature.xml file in 12\TEMPLATE\FEATURES\Themechanger
The last bit is to assign which site definitions should apply the theme.
You edit this in the Elements.xml file.
I added the line for mysites - SPSPERS#0
To see how to get a list of all site templates go here - http://stsadm.blogspot.com/2007/08/set-available-site-templates.html
Make sure you recycle your app pool for changes to take effect.
That’s it, should all work!!
1. Its Expensive
A SharePoint implementation doesn't have to be expensive. The most commonly used features such as:
These all come standard with Windows SharePoint Services (WSS).
WSS comes free with Windows Server 2003 and 2008. You don't even have to
purchase a SQL server licence.
2. It's not user friendly
Because SharePoint is easy to get up and running and is relatively inexpensive, many organisations install it and provide no training or instruction to their staff.
Like any highly functional software, SharePoint can introduce a lot of new concepts and so there are certain steps that should be taken by every organisation implementing SharePoint:
Assign a SharePoint champion(s).
Someone who has a good understanding of SharePoint from a users perspective and can help with day to day issues.
Someone to help manage change in an organisation, often with resistance from users.
With proper planning many of the common usability issues users experience when they first encounter sharepoint can
be greatly reduced or even removed. E.G Hiding features that are unnecasary or by creating shortcuts to the most commonly used features.
3. It doesn't look good always looks like SharePoint.
When it comes to the look and feel of SharePoint there are really 2 different SharePoints.
There is the Web Content Managment Side (WCM) and the Enterprise Content Management (ECM) side.
The good news is that the WCM side can be made to look however you choose.
Some of the best examples can be found here - http://www.wssdemo.com/Pages/topwebsites.aspx
The ECM side which is more commonly used for intranets is easy to brand, harder to customise but can still be done so with a bit of effort.
Examples of what can be done can be seen on sites such as sharepointpackages.com
4. It's only a document management system
Although the fantastic Document Management functionality is what initially attracts most organisations to SharePoint,
Document Management is only skimming the surface of SharePoint's capabilities.
Some of the out of the box features are
and much more
5. It can be installed and configured by your IT dept even if they have no
SharePoint installations can be done by anyone with IT experience but there are likley to be many best practices that will get overlooked.
Examples are incorrect permissions, sub optimal performance configuration, planning for future growth and correct back up procedures.
While working on a client's MOSS 2007 Publishing site, we ran into an issue where we simply couldn't create any CMS pages. After clicking Site Actions -> Create Page, the page would act like it was posting back and, after a several minutes, would either time out, or prompt me for my credentials 3 or 4 times in a row only to finally display a "You are not authorized to view this page" error. The same happened when attempting to create a page from clicking "New" in the Pages library, clicking "Create" on the View All Site Content page then clicking Publishing Page, or clicking New on the Mangage Content and Structure page while in the Pages library.
This all started happening after I went into Site Settings -> Page Layouts and Site Templates (under the Look and Feel section) and modified which Page Layouts were available for the user to select when creating a new CMS page. Figuring the issue lied in this change of settings, I tried to go back into the Page Layouts and Site Templates settings page again, only to discover it was acting the same way as the Create Page function.
Having no error information to go against and nothing useful coming from the bumped up logs (except an unknown lockfile error which we can't even be sure was linked to our issue), we took a shot in the dark that our issue was permissions related. The user we used to change the Page Layouts and Site Templates settings was a Farm Administrator, Site Collection Administrator, and had Full Control on the particular site we were on, not to mention the fact that we were able to change the Page Layouts and Site Templates settings with this user in the first place. However, we logged in with the System Account and voila!!, we were able to create a CMS page AND access the Page Layouts and Site Templates page.