Requirements Today I had the requirement to add custom validation logic to a SharePoint edit form. The edit form is being displayed using a ListFieldIterator. The requirement was to make sure the Date field could not be set to a date in the past. The solution (Other solutions are available and are most probably better!) [...]
Archive for April, 2010
How to add custom validators to the SharePoint ListFieldIterator
Posted in .net, sharepoint, tagged BaseValidator, sharepoint ListFieldIterator on April 28, 2010 | 3 Comments »
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 | 3 Comments »
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 [...]
Typemock: System.NotSupportedException: Cannot dynamically create an instance of System.Void.
Posted in unit testing, tagged typemock, unit testing on April 19, 2010 | Leave a Comment »
Had a problem mocking a call to SPWorkflowActivationProperties.Item today. Turns out to be a bug in the TypeMock library. Problematic unit test When executed it throws the following exception: Fix: I can work around this issue by replacing the line: With: See thread on Typemock forum
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 [...]