Sometimes it’s useful to overwrite the created by and last modified by fields and get rid of that pesky ‘System Account’ ! Created By The internal field name for the person who created a list item is ‘Author’ use SPBuiltInFieldId.Author to access this field. The display name for this field is ‘Created By’ it can [...]
Posts Tagged ‘sharepoint’
How do you update the ‘Author’ or ‘Created by’ and ‘Editor’ or ‘Modified By / Last Modified’ fields of a list item (SPListItem)
Posted in .net, sharepoint, tagged sharepoint, SPListItem, SPListItem.UpdateOverwriteVersion() on April 21, 2010 | Leave a Comment »
InfoPath forms with workflow: ‘The form has been closed’ or Exception occurred during request processing. (User: {Domain}\{UserName}, Form Name: , IP: , Request: http://localhost/_layouts/CstWrkflIP.aspx?List={ID}, Form ID: , Type: InfoPathLocalizedException, Exception Message: The specified form cannot be found.)
Posted in infopath, sharepoint, tagged infopath, sharepoint on April 7, 2010 | Leave a Comment »
Okay so today’s error message, totally my fault: was Exception occurred during request processing. (User: DOMAIN\xx, Form Name: , IP: , Request: http://localhost/_layouts/CstWrkflIP.aspx?List={ID}, Form ID: , Type: InfoPathLocalizedException, Exception Message: The specified form cannot be found.) Make sure that: Your feature file has the RegisterFroms property correctly pointing to a folder in your solution package [...]
Cannot change the lookup list of the lookup field.
Posted in .net, sharepoint, tagged sharepoint, SPFieldLookup on February 8, 2010 | Leave a Comment »
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 [...]
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 [...]
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() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at [...]
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 [...]
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); }