You are currently browsing the category archive for the ‘SharePoint’ category.

Now with SharePoint and Dynamics CRM running on the same dev box, attaching to a Process ID can become a challenge in identifying which one is what.

Luckily, IIS comes to the rescue. In a command prompt, run appcmd with the list command to list all the worker processes and the associated application pools. The command looks like so:

appcmd list wp

you need to have the PATH mapped to C:\Windows\System32\inetsrv

Now you don’t have to attach the VS debugged to all w3wp processes, just pick the one you want to debug against.


At the Central Administration Level (across the farm)

Open up Central Administration > Application Management

Under “Service Applications” click on Manage service applications


Click on Search Service Application


Under Queries and Results on the Quick navigation click on Scopes

From here on instructions are identical to the steps performed at the Site collection Level.

At the Site Collection Level

Site Actions > Site Settings

Under “Site Collection Administration”, click on Search Scopes


Here you can create new scopes, and edit the custom scopes. Once a scope is created, you have to add rules for crawling.


Pay close attention to how you can structure include/exclude settings to capture only a certain section of a network share:



This is something simple, but I’ve been asked several times about it already, so I’m going to post instructions here on how to achieve this.

Requirement: Store documents and links to documents in the same library


1. Create a Document Library within your site

2. In Library Settings > Advanced Settings enable management of content types

3. Add content type from existing site content types

4. Select and add Link to a Document as a new second content type


5. Start adding content using both content types:


Now you can store in the same document library both Documents and Links to external documents.

Hope this helps, enjoy!

So you’ve set-up your account to be a farm admin, and you’re trying to deploy your solution. But you get the message above.

That is because, even though you are a farm admin, your account does not have the proper permissions to the SQL database.

Check that first. Keep in mind, in 2007 certain update could cause this behavior, in which case just restart the DB service.


  • The farm is unavailable
  • Object reference not set to an instance of an object.

The following permissions are required to allow you to deploy a solution:

  • Farm Administrator (Central Admin)
  • db_owner and db_securityadmin on the config database
  • Local admin on the servers

Are you lazy like me, and hate walking through thousands of lines of error messages logged in by ULS?

Well, now with PowerShell, life is about to get so much easier. Welcome to Get-SPLogEvent.

How to use:

Get-SPLogEvent | ?{$_.Correlation –eq “Your-correlation-id-GUID”} | ft Timestamp, Category, Message –Autosize

What you get is the category and message related to the specified correlation id.

This saved me quite a few hours of debugging on one of my last projects, otherwise it wouldn’t have caught my attention like so.

Enjoy Smile

As you’ve probably seen by now, once you create multiple site collections in the same web application, you don’t get a lot of options as far as database location. Well, it’s really not that complicated:

  • Create the databases for the new site collections (easy enough in CA)
  • Run the following PowerShell command for each site collection, or put it in a script if you feel like it:

Move-SPSite <YourSiteURL> –DestinationDatabase <ContentDBName>

That’s it, easy as pie. See more information on TechNet:


Part of SharePoint 2010, a new tool was added to made life easier: the developer dashboard. By default disabled, you can enable it multiple ways:


stsadm –o setproperty –pn developer-dashboard –pv ondemand

Using PowerShell:







Write-host(“Level:” + $contentSvc.DeveloperDashboardSettings.DisplayLevel)

Values available to be set for the developer dashboard:

  • On
  • Off
  • OnDemand

Using code:

SPWebService srv = SPWebService.ContentService;

srv.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.OnDemand;


NOTE: using SPFarm is not supported in the final release of SharePoint.

Happy debugging!

Ok, this should be common knowledge by now, but when setting your own development box for SharePoint (whether it’s 2007 or 2010), these are the changes to web.config required to show proper error messages, and none of that “friendly” end-user centric messages:



<SafeMode CallStack=”true” … />



<CustomErrors mode=”off” />




Other sources to look at when debugging:

  • SharePoint event log
  • SharePoint logs
  • Debug the working process
  • IIS logs
  • Use tracing
  • Use remote debugging if no debugger is installed (not usually applicable to your development box)

This is not something I do every day, and I keep forgetting how to do it, so I’m posting this as a self-reminder.

On a Publishing site (collection), if I need to add sub-sites based on the Team Site template:

Go to Site Settings > Look and Feel > Page Layouts and Site Templates

Add from there the Team Site or any other site template to be used

Go and create a new sub-site based on the template just added.


Because I’ve been asked so many times what’s the difference between the versions, and what’s included at what level, here’s the official list of features by version:

Also, a good list, same thing but different layout:


Had to put together a quick demo the other day, highlighting some of the features of SharePoint 2010 at all levels (Foundation, Standard, Enterprise). One of the items on the list was BCS. Keep in mind, this is a quick show-how for a demo, so I wasn’t going to spend any time coding anything.

So, BCS with no code! Let’s fire-up SharePoint Designer 2010 (at this point I’ve probably lost all the hard-core developers, so let’s move on…)

First, know where your external data source is. In my case, I took a backup of the default CRM 4.0 VPC database, and restored it on my SharePoint Demo VPC.

Next, in SharePoint Designer, open the site where you will show the External List. In Site Objects on the left side, go to External Content Types. Add a new one.

Fill in the Name, Display Name, Version, and the other fields.

The Office Item Type presents familiar options like:

  • Generic List
  • Appointment
  • Contact
  • Task
  • Post

Offline Sync for external list is “Enabled” by default, but you can disable it if required.

Now, pay attention to External System. Click on the link:


Click on Add Connection, define the database information, and you should see it in the Data Source Explorer. Browse to the View you want, right-click and create the operations you want, or all.

Save, and that’s almost it.

Now, go back to External Content Types (remember, on the left side menu), and select External List to create a new list. Give it a name and description. Voila, almost done. You can close SharePoint Designer now.

Go to your site, and browse to the list you’ve just created. You should see the loading animation, and then poof, error. Permissions!

Go to Central Administration, Application Management, Service Applications, Manage Service Applications. Click on Business Data Connectivity Service.


You see here CRM_Contacts which I just created. Select it and go to Set Object Permissions. Enter the user or group that you want to be able to see the list. Select the permissions.


Now that that’s done, browse back to the list, and VOILA!

Now do your own filtering, sorting and formatting of the view (ideally in a new view).


More often than not, the client wants to keep existing Flash assets when upgrading to SharePoint 2010. You will quickly find that the old work-around from SharePoint 2007 does not work anymore. Changing the “z-index” to a higher value does not bring the menu on top anymore.

The way to fix this issue in SharePoint 2010 is to modify the Flash container, and make it transparent. Add value=”transparent” to the object tag, and change the embed tag to paramname=”transparent”.


MVP Reconnect

Check out my course [Video]

Dynamics 365 Customer Engagement Administration

Dynamics 365 Customer Engagement Administration

Check out my course [Video]

Configuring and Extending Dynamics 365 Customer Engagement

Configuring and Extending Dynamics 365 Customer Engagement

Check out my course [Video]

Getting Started with Dynamics 365 Customer Engagement

Reviewed Book

Implementing Microsoft Dynamics 365 for Finance and Operations

Implementing Microsoft Dynamics 365 for Finance and Operations

Reviewed Book

Microsoft Dynamics 365 Extensions Cookbook

Microsoft Dynamics 365 Extensions Cookbook

Check out my Book

Microsoft Dynamics CRM 2016 Customization - Second Edition

Microsoft Dynamics CRM 2016 Customization - Second Edition

Check out my Book

Microsoft Dynamics CRM Customization Essentials

Microsoft Dynamics CRM Customization Essentials

Check out my Book

Reviewed Book

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 609 other followers

Follow Dynamics 365 Wizardry on