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 [...]
Archive for the ‘sharepoint’ Category
Cannot change the lookup list of the lookup field.
Posted in .net, sharepoint, tagged sharepoint, SPFieldLookup on February 8, 2010 | Leave a Comment »
Engine RunWorkflow: System.Workflow.ComponentModel.Compiler.WorkflowValidationFailedException: The workflow failed validation.
Posted in sharepoint, tagged rules, sharepoint, workflow on January 21, 2010 | Leave a Comment »
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 [...]
An error occured while validating or updating the directory service connection. No update was performed.
Posted in bugs, sharepoint, tagged bug, sharepoint, userprofiles on January 11, 2010 | Leave a Comment »
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
SharePoint custom workflow activity. “Failed to load toolbox item. It will be removed from toolbox.”
Posted in sharepoint, workflow, tagged activity, bug, custom activity, custom workflow, sharepoint, workflow on December 27, 2009 | 2 Comments »
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.
Safe mode did not start successfully. Could not load file or assembly
Posted in sharepoint, tagged debugging, sharepoint on December 22, 2009 | Leave a Comment »
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() [...]
Programmatically determine is a feature is activated or even installed
Posted in .net, sharepoint, tagged sharepoint, SPFeature, SPFeatureCollection, SPFeatureDefinition on December 17, 2009 | Leave a Comment »
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 [...]
The imported project “C:\Program Files\MSBuild\Microsoft.Office.InfoPath.targets” was not found
Posted in development, sharepoint, tagged infopath, msbuild, sharepoint on December 17, 2009 | Leave a Comment »
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.
You cannot customize permission levels in a web site with inherited permission levels. at Microsoft.SharePoint.SPRoleDefinitionCollection.Add(SPRoleDefinition role)
Posted in sharepoint, tagged sharepoint, SPRoleDefinition on December 16, 2009 | Leave a Comment »
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);
}
Server Out Of Memory – There is no memory on the server to run your program. Please contact your administrator with this problem. at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
Posted in bugs, sharepoint, tagged bug, onet.xml, sharepoint on December 15, 2009 | Leave a Comment »
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;" [...]
SharePoint field constants.
Posted in sharepoint, tagged field, fieldconstant, fieldid, sharepoint, SPBuiltInContentTypeId, SPBuiltInFieldId on December 14, 2009 | Leave a Comment »
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))
{
……
}