SharePoint Dragons

Nikander & Margriet on SharePoint

Monthly Archives: March 2012

Esoteric info about retrieving content database info via the SharePoint OM

When you call the ContentDatabase property of an SPSite instance, it actually uses a composite key consisting of the web application id and the path of the site collection. Execute this SQL query in the SharePoint config db to see it:

select * from sitemapvisible

image

In the object hierarchy of the config db, things are a little different though, and it looks like this:

content db [child of] sharepoint database service instance [child of] spserver [child of] config database.

When will you be using this info? Uhm, probably never, that’s the esoteric part about it.

Popularity of SharePoint around the world

Based on our blog readers, SharePoint is popular around the world! Okay, the number of readers in Greenland are disappointing so far, and we’re not very popular in China, but we’ve got every continent represented.

image

What is the SharePoint 2010 best practice: Asset or a Picture library

If you (or your customers) were wondering whether you should use an asset or a picture library, check out our Wiki page at:

http://social.technet.microsoft.com/wiki/contents/articles/8110.sharepoint-2010-best-practices-asset-vs-picture-library.aspx

Content db limits include remote BLOBs

It’s funny, cynical, and educational: http://www.sharepointedutech.com/2011/07/11/sharepoint-contentdb-guidance-too-many-shades-of-gray-along-with-a-little-brown/

Easy to miss, since the article is not about that, but we really liked the comment that the fact that auditing is either turned on or off has a great impact on capacity planning:

With the BLOBs remoted it’s much more likely that you’re going to hit an object density threshold (i.e. items in a list) before you reach a content db size threshold unless of course you have an enormous amount of metadata, are storing a large number of versions, or have auditing turned on…that last one always catches folks off guard and is rarely accounted for in capacity planning exercises.

Uploading files as attachments

The first time we’ve read a description of the SharePoint list attachment process and well worth your read: https://www.nothingbutsharepoint.com/sites/eusp/Pages/sharepoint-list-attachment-technical-brief.aspx

Determine the current user in a SPS 2010 workflow

What to do when you want to determine the current user in a workflow? It’s possible that the workflow runs inside the w3wp.exe worker process, in which case the current user makes sense. But it’s also possible that a workflow runs inside the owstimer.exe process, at a later time. In these cases, the current user doesn’t make sense. Instead, use the workflow originator or initiator.

To get the e-mail adress of the originator user:

workflowProperties.OriginatorUser.Email

Or

workflowProperties.OriginatorEmail

To get the display name of the originator user:

workflowProperties.Originator

Or

workflowProperties.OriginatorUser.Name

To get the login name (format [domain name]\[user name]:

workflowProperties.OriginatorUser.LoginName

These techniques can be used in workflows that are created programmatically. In a SPD (no-code) workflow, you can also retrieve the workflow initiator’s e-mail address: use the User Profile web service as a data form web part in the .aspx page of the workflow to get the e-mail address whenever the initiator started the workflow.

For ongoing work regarding workflow current user retrieval best practices, see: http://social.technet.microsoft.com/wiki/contents/articles/8044.sps-2010-best-practices-retrieving-the-current-user-in-a-workflow.aspx Thanks to http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/a5c5094c-5578-4e3c-83f2-62308f9f946f/ for the info.

What are the options for reusing PPS 2010?

If you want to reuse Performance Point Services 2010 in a non-SharePoint environment, there are a couple of options available:

  • The easiest way to reuse the UI would be via WSRP, but that’s not supported by PPS.
  • Screen scraping is another possibility, but that’s a hack.
  • You can <iframe> a dashboard, but then, the SharePoint UI is still visible.

PPS itself offers the following possibilities:

  • If you view a dashboard in the browser, it directly interacts with the BIMonitoringServiceApplicationProxy. The proxy communicates to the PPS shared service (a WCF service called BIMonitoringService.svc). You can try to leverage that.
  • If you’re creating a cuustom asp.net page you can talk to the rendering web service (PPSRenderingService.json) which eventually also talks to the BIMonitoringServiceApplicationProxy.
  • You can talk to the Authoring web service (PPSAuthoringService.asmx) that eventually also talks to the BIMonitoringServiceApplicationProxy.

And those are the options that are there for you.

Anonymous users submitting InfoPath forms

Just came across this interesting article that discusses how anonymous users can submit InfoPath forms in SharePoint 2010: http://claytoncobb.wordpress.com/2011/06/03/infopath-allowing-anonymous-users-to-submit-forms-in-sharepoint-2010/

What to do with historical data in custom lists?

  • If the historical data doesn’t take up much space, leave it in the original list.
  • Turn on versioning if you want to track the history of individual list items.
  • If the history involves different records, leave them in the list and sort the view on the date of the history with the most recent at the top.

Finally, the most common option: eventually archive the items to a different site collection in a different content database.

Follow the ongoing Wiki effort to discuss the best practices regarding this topic at: http://social.technet.microsoft.com/wiki/contents/articles/7999.sharepoint-2010-strategies-for-handling-historical-data-in-custom-lists.aspx

Expired SharePoint service account

Ooops, the password of the service account on our dev machine just expired. Running the solution: http://support.microsoft.com/kb/934838 and we’re back in business again!