So lets say you want to change a list item but you donâ€™t want to impact any versioning or having to deal with check-in or check-out, and you donâ€™t want to change the last modified or modified by values. You can do this with the bit of code shown below. Grab the item reference and update the item just as you normally would however rather than calling SPItem.Update() you want to call SPItem.SystemUpdate(). You can check out the TechNet reference if you want to see additional code samples.
Just had a conversation with a couple instructors in the speaker room here at the BPUK Conference. What is the most efficient way to get a list of sites a user has permissions to. Search of course, it does the security trimming for you and it has a master list of all sites within SharePoint (assuming you crawl SharePoint sites).
Keeping up with WSS, MOSS, SharePoint Foundation, and SharePoint patches can be a challenge. The guys on my team work with many different clients whom typically run at different SharePoint versions and patch levels. Its often we have only version numbers rather than the specific patch or KB which documents an installed patch. In addition, we sometimes have the need to build out lab environments at the same patch level as the client.
Continue reading We Donâ€™t Need No Stinking Patches
In this season of giving why not consider adding ULS logging to your customizations for your SharePoint administrators. When troubleshooting a critical issue around the holidays nothing goes better with the old Eggnog and Jack Daniels than some good old fashion, the way your mama did it, diagnostic logging. In this post I will show you a pattern that I use which not only provides an easy way to add that logging to your SharePoint customizations, e.g.. one method call, but also allows the SharePoint Administrator, tat has to keep your code up and running, the ability to customize and manage the Tracing and Event levels from within Central Administrator just like any other logging component within SharePoint Server 2010.
Seems like a simple question however for SharePoint 2007 and 2010 it may be harder than you think to get a solid answer. What is really behind the question is how much space is my versions taking up or to put it another way if I trim my versions how much space will I get back. Unfortunately we have hit upon two shortcomings with SharePoint, 1) there is no out of the box reporting mechanism to give a SharePoint administrator any insight into number of versions or storage and 2) there is no out of the box trimming policy or mechanism which can be applied. For the most part we are left with implementing storage quota and either increasing quota when requested or asking users to do a self trim of documents and/or versions manually.
In this blog post I am going to show how to use an alternate rendering mechanism to render Managed Metadata Fields which allows them to behave like standard Choice Fields.
A Brief Background
Managed Metadata fields are a really cool feature of SharePoint 2010. They allow an administrator to configure a field in SharePoint to source its values from one or more terms within a term set. Terms can be used in a number of ways such as tagging and in fields within lists and libraries. I have had several of my customers want to move away from using Choice based fields for some of their content types to Managed Metadata fields however the editing experience changes. Choice fields usually render as either a dropdown list or in the case of where multi values are a set of checkboxes for each potential choice value. Managed Metadata Field editing is done with a single textbox which leverages AJAX to implement type ahead auto population. As a result a user can start typing part of the name of a term and a list will pop within the UI to help filter the choice of terms. There is also a button next to the textbox which allows the user to popup a modal dialog that displays the choice of terms. As you can probably tell by this description the user experience can be quite different when moving from a SharePoint Choice Field to a Managed Metadata Field and users will most likely find this move at least a little confusing.
SQL Aliases have been around for a while however I am amazed at how many folks either donâ€™t know about them or donâ€™t use them. A SQL Alias is just a really easy way to do a string substitution of a connection string just before a connection is made to a SQL server. The SQL Alias configuration is stored in the registry and the anywhere the server name portion of the connection string matches the server alias the substation is made.
In a previous blog post I talked about how you can use XSLT to display additional Managed properties returned from Search. In this post I want to talk about the method I went about to create the XSLT in the hopes that you find it an interesting enough pattern to use should you find yourself creating some of the same visualizations for Search, the CQWP, Lists, or the BCS WebParts which all use XSL to transform XML into HTML.
A good friend of mine Steve Peschka did a blog post during the SharePoint 2010 Beta which shows how to include a document’s rating within search results without writing any code. Well its been almost a year since that post and allot of things have changed. Since we RTM’ed SharePoint 2010 there are several key components to that blog that no longer work and this post is an attempt to update and hopefully add a little to the effort he started.
The SharePoint 2010 August CU has a good number of User Profile Service (UPS) fixes and is worth installing. You may however notice a couple of fun error messages which start to appear to fill your Windows Application event logs, for example:
Recently some of the MCM SharePoint masters were kicking around different development environments and setups for SharePoint 2010. This was an interesting conversation because of SharePoint 2010’s support for Windows 7 and Windows Vista as an OS for development and test purposes. For more information on how to set this up check out this MSDN article. In some circles SharePoint development on Windows 7 has become the platform of choice due to Microsoft’s lack of an offering for x64 virtualization on Windows 7. For me personally however running Windows 7 as a SharePoint development environment was not ever that compelling for a number of reasons:
Well it’s the middle of July so you know what time it is, its time for the SharePoint 2010 June CU.
Here are a few links…
So for those that have not already done so installing the Visual Studio 2010 Power Tools is well worth your time, especially if you do any SharePoint development. Today I created a console application to test SharePoint 2010. One of the more annoying tasks when creating such an application is adding all the necessary references to the project — mainly because this is very taxing for my brain to try to remember the various assemblies. One of my favorite features of the VS 2010 Power tools is the new Add Reference dialog (see below).
We just released IT Professional and Developer training which includes PowerPoint presentations and videos going over the presentations along with demos to break things up a bit.
In my previous post I documented a bug in SharePoint where a memory leak can greatly impact that amount of memory you SharePoint WFE will use during the normal processing of web request. The SharePoint PG just recently released the 2010 April CU for WSS 3.0 and MOSS 2007. It requires you have Service Pack 2 before installing these cumulative updates but I can tell you that is something you want to invest in.
So lets say you create a new site based on the Team template and you would like to create a search center site under that same site collection. So you navigate to Site Actions – New Site and maybe you choose the Enterprise Search Center template and provide a name for your new site and hit “Create”. Well you may be presented with an error like this one…The dreaded unexpected error has occurred error, yuk (failure #1).
I Have had the great honor of hitting a good number of errors while setting up the User Profile Sync service. I documented one error here but when setting up another environment today I hit yet another. The environment in question was a two server setup with one server being the DC and the other SharePoint + SQL Server. I use the farm account CONTOSO\FarmAccount. I setup all Service Applications using the PowerShell script found here and started the services I wanted to run. When I got to starting the User Profile Synchronization Service I would eventually see the following error in the event log.
While running SharePoint 2010 I started to notice the following error messages in my Application event log each time I restarted the IIS Worker process and made a request.
On SharePoint 2010 you may run into the following error (hell that is a damn lie, you will hit this error eventually if running RTM).
I think its safe to assume most SharePoint developers which have been working with the product for any length of time have seen code similar to the code below below. Its a common problem, disposable objects which are not disposed. There has been a ton written on this problem and Roger Lamb wrote a great tool called SPDisposeCheck which you run against your assemblies to determine if they may be failing to call Dispose.