Author Archives: Bernado

Unknown's avatar

About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.

How to close SharePoint modal wait screen after postBack when page is in dialog mode

————– UPDATE: The code originally posted doesn’t work with IE. You get a “Can’t execute code from a freed script” error and the wait screen is not removed after postBack. The code works fine in Chrome and Firefox. I now … Continue reading

Posted in ModalDialog, SharePoint 2010, SharePoint JavaScript API | Tagged | 10 Comments

How to detect user is locked out when using Form Based Authentication in SharePoint 2010

When using FBA in SharePoint 2010 you get the error message below on login when the user name and/or password is incorrect. You get the same error message when the user account is locked out, which is not very useful … Continue reading

Posted in Claim Authentication, Form Based Authentication, SharePoint 2010 | 1 Comment

Lessons learnt in implementing ASP.NET login controls in SharePoint 2010

Recently I had to implement Create User, Change Password, Password Reset (Recovery) in SharePoint 2010. I decided to use the OOTB ASP.NET login controls for this. Mostly these controls just worked in SharePoint 2010 as they do in ASP.NET. There … Continue reading

Posted in Claim Authentication, Form Based Authentication, SharePoint 2010 | Leave a comment

“Your query is malformed. Please rephrase your query.” when searching using “None of these words” query

You get the error message “Your query is malformed. Please rephrase your query.” when searching in SharePoint using the “None of these words” query. Spent hours trying to figure it out? I know I did.. This is actually an OOTB … Continue reading

Posted in Search, SharePoint, SharePoint 2010 | Leave a comment

How to add custom user profile properties to the People Search Options dropdown

If you are using the OOTB FAST Search Center site template then by default you get a tab for People search on the main page. On this tab you get a Search Options link, which  brings up the dropdown box … Continue reading

Posted in Search, SharePoint 2010 | 6 Comments

Tips for organising your SharePoint project in Visual Studio

Becky Bertram recently blogged about Visual Studio project organisation for SharePoint. I agree with most of her points, and below are 3 additional conventions I’d suggest to others: 1. Always group SharePoint project items (SPI) into folders by project item … Continue reading

Posted in Practices, SharePoint, SharePoint 2010 | Leave a comment

SPException “The collection cannot be modified.” when calling SPContentType.Update()

If you are getting the SPException “The collection cannot be modified.” when calling SPContentType.Update() then ensure that the content type you are updating was not retrieved from the SPWeb.AvailableContentTypes collection. Content types retrieved from this collection (as oppose to SPWeb.ContentTypes) are … Continue reading

Posted in Content Types, SharePoint, SharePoint 2010 | 7 Comments

Adding Browse button to pick a document when creating Link to a Document

The OOTB Link to a Document content type is quite neat. It allows you to create a link to documents in other locations in your site. External links are also possible. The user experience is quite poor. The user either … Continue reading

Posted in SharePoint 2010 | 7 Comments

Null reference exception when adding content type to document library at Microsoft.SharePoint.SPFile.UpdateInternal

I was adding content types to a document library using C# and got a Null reference exception when calling SPList.ContentTypes.Add(contentType). The stack was: My code to add the content type was fairly innocent: It turns out that it was because … Continue reading

Posted in SharePoint 2010 | 1 Comment