Skip to main content

Posts

Showing posts from December, 2009

How to really disable event firing in sharepoint

One of the things I found out the hard way while programming event handlers in sharepoint is that you have to wrap your update() or delete() functions with the disableeventfiring function individually, for example: this will work: base.DisableEventFiring(); item.update(); base.EnableEventFiring(); this will NOT work: base.DisableEventFiring(); item.update(); item.delete(); base.EnableEventFiring(); So the moral of the story is, only do one event triggering action at a time, do not try to do 2 or more within one wrapper.

Specify Default Scope for Advanced Search Box Web Part without Using Scope Picker

This led me to investigate the advanced search box web part further and the solution presented itself when I went and viewed the XML for the “Properties” property of the web part. Within the schema there is a node called . It is here that the out of the box configuration specifies the various result types used to bind the result type picker to. Below is the default results type XML for the advanced search box web part. [Query]FileExtension='ppt'[/Query] You’ll notice that within the [Query] node that query syntax is being used to filter the search as opposed to keyword syntax. This is important and may explain why you see little to no documentation on how to specify a scope in an advanced search query. In order to specify a scope in query syntax you must enclose the scope restriction in quotes as follows: “scope”=’Your Scope’. Queries for the “Advanced Search Box” web part, however, are declared in XML. Therefore, in order to enclose the scope restriction in quotes you must es

_spBodyOnLoadFunctionNames

[script language="JavaScript"] //add an entry to the _spBodyOnLoadFunctionNames array //so that our function will run on the pageLoad event [script type="text/javascript" ] _spBodyOnLoadFunctionNames.push("changeAdvanceSearchFont"); function changeAdvanceSearchFont() { document.getElementById("ctl00_g_80230064_506c_4c19_85d4_7392cf5ebc4d_S1B1A6FD9_AdvSearchLink").style.color="white"; } [/script]

Think About Your SharePoint Taxonomy Before Deployment

The quickest way to fail from a user perspective is to not train your users how to build a good site taxonomy in collaboration with IT. Remember that you want to build your taxonomy wide not deep. Use the 6 P's and you will have a true collaboration site that will last. Failure to do this up front will cause you to have to spend a lot of time exporting & importing your sites to get it right. Planning worksheets for Office SharePoint Server 2007 URL: http://technet2.microsoft.com/Office/en-us/library/49cf7edd-14ee-445b-8ab0-1d1339f2435f1033.mspx Plan Web site structure and publishing (Office SharePoint Server) URL: http://technet2.microsoft.com/Office/en-us/library/6a4b0ec4-8802-40f9-87ac-6a6691b544a41033.mspx Plan Web site structure and publishing (Windows SharePoint Services) URL: http://technet2.microsoft.com/windowsserver/WSS/en/library/aa456629-8de8-4328-873b-2e2db96714011033.mspx Plan site navigation (Windows SharePoint Services) URL: http://technet2.microsoft.com/windo

Adding Search Scopes to Advanced Search

Search scopes can be defined by the Shared Service Provider administrator and then the site collection administrator can assign these search scopes to groups. For example, in the following diagram a shared scope called “Exclude Dublin Bus” (don’t ask…) has been defined in the shared service provider, and is included in “Search Dropdown” group: The “View Scopes” form can be accessed throughthe Site Actions + Modify All Site Settings menu command for the site collection and then selecting “Search Scopes” under “Site Collection Administration”. This means the search scope is displayed in the scope drop down for search: To add the same search scope for the “Advanced Search” form you should first add the search scope to the display group “Advanced Search” using the “View Scopes” form shown above. Next, you need to display search scopes in the “Advanced Search” form. To do this, navigate to the “Advanced Search” form and select Actions + Edit Page. Then select the edit + Modify Shared Web Pa