I recently declared an Event Receiver through a SharePoint Feature: Event Registrations
Some of the samples online had surprising elements such as and . I have never seen them used before and didn’t know their purpose. Perhaps they are not to be messed with ? Perhaps great power lies within ?
-
Data – Specifies a string that will be passed as a parameter to the receiver method when handling the event
This one is commonly found in the documentation. It can be used to declare additional information and then the Event Receiver code behind can use this information. Better than hardcoding although I haven’t had the need for it (yet ?).
-
Filter – Reserved. Filter MUST be NULL
According to the official docs it is reserved: Event Receivers Result Set
Thank you Thomas for helping me on this one !
Also here’s a good reference: SharePoint 2007 Deployment: Event Registration Features
If you have MOSS 2007 than you get the Site Manager for advanced management and with it the “Content and Structure Reports” (http:///Reports List).
You can easily display the results of a report through the Site Actions menu. You can also add custom reports since the underlying technology is SPSiteDataQuery and the syntax to use is CAML. For an overview see Vince’s blog post.
If you have issues displaying results then remember you can use the Diagnostic Logs feature in SharePoint to troubleshoot. If there’s an issue the default logging level will pick up the Unexpected entry, but if you need additional info you can configure the logging level in Central Administration. You will need to be looking into the “Site Management” event category.
For example; if you portal has more than 1000 lists then by default the Reports won’t return any results. Use the logs to diagnose the issue:
06/29/2009 20:17:40.34 w3wp.exe (0x0960) 0x0A3C CMS Site Management 622h Unexpected SMReportsData GetQueryResults - Query Execution threw SPException: The query cannot be completed because the number of lists in the query exceeded the allowable limit. For better results, limit the scope of the query to the current site or list or use a custom column index to help reduce the number of lists.
06/29/2009 20:17:40.34 w3wp.exe (0x0960) 0x0A3C CMS Site Management 6oz4 Medium SmtPerf: SMDataSource.PopulateQueryResultsDataSet(SHAREPOINT\system) - Elapsed time= 00:00:00.0500720
06/29/2009 20:17:40.34 w3wp.exe (0x0960) 0x0A3C CMS Site Management 6oz4 Medium SmtPerf: SmtMainPage.OnPreRenderComplete - accumulated(SHAREPOINT\system) - Elapsed time= 00:00:00.1802592
You can override the Lists settings by editing each report item and specifying the CAML List Type as follows:
(Make sure not to misspell the attribute: info)
Note that this does have a performance impact on your environment: Additional performance and capacity planning factors
Good luck !