Feeds:
Posts
Comments

Archive for the ‘sharepoint’ Category

Ever get this error message
SPException “Cannot change the lookup list of the lookup field.”
Once a lookup field (SPFieldLookup) has had it’s LookupList and LookupWebId set you can’t change them.
There is a good reason for this if your lookup field is used in multiple lists or already has data entered, you would effectively break the referential [...]

Read Full Post »

Getting this error message today:
Engine RunWorkflow: System.Workflow.ComponentModel.Compiler.WorkflowValidationFailedException: The workflow failed validation.     at System.Workflow.Runtime.WorkflowDefinitionDispenser.ValidateDefinition(Activity root, Boolean isNewType, ITypeProvider typeProvider)     at System.Workflow.Runtime.WorkflowDefinitionDispenser.LoadRootActivity(Type workflowType, Boolean createDefinition, Boolean initForRuntime)     at System.Workflow.Runtime.WorkflowDefinitionDispenser.GetRootActivity(Type workflowType, Boolean createNew, Boolean initForRuntime)     at System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId, CreationContext context, WorkflowExecutor executor, WorkflowInstance workflowInstance)     at System.Workflow.Runtime.WorkflowRuntime.Load(Guid key, CreationContext context, WorkflowInstance workflowInstance)     at System.Workflow.Runtime.WorkflowRuntime.GetWorkflowExecutor(Guid instanceId, CreationContext context)     at System.Workflow.Runtime.WorkflowRuntime.InternalCreateWorkflow(CreationContext [...]

Read Full Post »

I got this error whilst trying to get User Profiles to work. Things to check:
 

Domain name is correct
If using custom sources, try creating a new custom source and deleting the old one

Read Full Post »

I was getting this error message in Visual Studio 2008 when adding a custom activity to an existing workflow.
 
Solution
This worked for me, your mileage, may and probably will vary.
It was necessary for me to un-gac the workflow project, then the custom activities could be added to the design surface as expected.

Read Full Post »

Ever get any of these errors?

The DataSourceID of ‘TopNavigationMenu’ must be the ID of a control of type IHierarchicalDataSource.  A control with ID ‘topSiteMap’ could not be found.   at System.Web.UI.WebControls.HierarchicalDataBoundControl.GetDataSource()    at System.Web.UI.WebControls.HierarchicalDataBoundControl.ConnectToHierarchicalDataSource()    at System.Web.UI.WebControls.HierarchicalDataBoundControl.OnLoad(EventArgs e)    at System.Web.UI.Control.LoadRecursive() [...]

Read Full Post »

Okay so ever needed to see if a particular web or site feature is activated? Well if it’s activated it will be in the SPWeb.Features SPFeatureCollection or SPSite.Features. If it’s not activated it won’t be. Simple.
To check if a feature is installed examine the feature definitions collection on the SPFarm object, below are a couple [...]

Read Full Post »

If you get this error message, which I did this morning opening up someone else’s SharePoint solution, make sure you have InfoPath installed.

 
Once I installed the InfoPath client application  with .Net Programmability Support, see below, the targets file was installed to the MSBuild directory.

Read Full Post »

Okay simple solution here: Make sure that if you are not the root SPWeb and you want to add custom role definitions i.e. SPRoleDefinitions call SPRoleDefinitionCollection.BreakInheritance(bool,bool)

if (!web.IsRootWeb && !web.HasUniqueRoleDefinitions)
{
web.RoleDefinitions.BreakInheritance(true, false);
}

Read Full Post »

There are lots of reasons this error message can occur, see: http://www.google.com/search?q=sharepoint+Server+Out+Of+Memory. In my case it happened when a new site was being provisioned using a custom site definition during the ApplyWebTemplate call.
Turned out the there were subtle errors in my onet.xml. In particular I was referencing some document templates using an incorrect path:

<Project Title="$Resources:onet_TeamWebSite;" [...]

Read Full Post »

I always forget the name of the class that stores a great big list of field ID constants. So as a reminder to myself it’s SPBuildInFieldId
For example:

SPFieldUserValue user = item[SPBuiltInFieldId.Author]

Whilst looking this up again I stumbled across another similar class SPBuiltInContentTypeId that holds content type id’s for the common OOTB content types, neat!

if (this.ContentTypeId.IsChildOf(SPBuiltInContentTypeId.Message))
{
……
}

Read Full Post »

Older Posts »