.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Exception occurs when checking in document with missing required fields

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :SharePoint
I have a document library with required fields. When the user uploads a document and closes the Properties window without entering the required fields, the document is still uploaded, but is left checked out. If the user subsequently attempts to check in the document without first editing the properties to supply values for those required fields, an exception is thrown and the user sees the following: Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed. The Event Log shows the following: Exception message: You must fill out all required properties before checking in this document. Request path: /_layouts/checkin.aspx Stack trace: at Microsoft.SharePoint.ApplicationPages.Checkin.OnLoad(EventArgs e) ... I would like to trap this error and present it to the user or somehow prevent the check-in event from getting far enough to cause this exception. I have tried coding something like this: public override void ItemCheckingIn(SPItemEventProperties properties) {     try     {         base.ItemCheckingIn(properties);     }     catch (SPException ex)     {         properties.Cancel = true;      &n

View Complete Post

More Related Resource Links

"You must fill out all required properties before checking in this document"


Hello All,

I am encountering an issue with multiple documents libraries not allowing any users to check in documents after editing properties. 

Before you jump to the standard responses please review the following conditions:

  • MOSS 2007 - Windows Server 2008 R2 - (SQL 2005 backend support) most recent updates applied as of 11/24/2010
  • Require Check out before making changes is set to NO.
  • ALL FIELDS ARE OPTIONAL (with the title hidden via content type)
  • All relative content types have been checked to verify that fields are set to optional or hidden.
  • ALL FIELDS approriate field data entered.
  • Issue occurs for all users at any permission level from Site Admin down -  Full Control - to contribute

Even with all of these things in place the error - You must fill out all required properties before checking in this document occurs and check in fails.

The only way to check the docs in successfully is to use the List Item editor off of code plex to perform the function.  Any help would be greatly appreciated.




SharePoint makes Office Document custom fields unreadable


We're using WSS 3.0SP2 with a Document Library that has document-level columns (fields) added. The columns (fields) are defined as single-line text; nothing fancy. In SharePoint we can set the field values no problem. When we pull the documents back out of SharePoint to the file systsem, and look at the Custom Fields, the values are unreadable gibberish. They look like graphics lines and boxes and the Type is set to Unknown.

Any ideas why this is happening and how to fix it?

SQL Reporting - Merging fields into document

Currently, we have a process setup that has a user create a merge in the application, then that merge is dropped into a .csv file onto the root of the c: drive of the individual's PC... they then take the .csv file and use macros within Word and run a merge process into a document template... (these are documents that are sent to the court for renewal of an expired legal process)..  I'd like to know if there is a better way of doing this? Is there a way of eliminating the .csv file and the merge process of Word, and keep everything within SQL and the Reporting services?  Any help in pointing me to the right resources for this would be appreciated. Thanks! jill

error in MVC2 on empty string form fields which are required: "This property cannot be set to a null

In model I have:[DisplayName("ISBN")] [Required(ErrorMessage = "ISBN is required.")] [StringLength(50, ErrorMessage = "ISBN book must have max {1} chars.")] [DisplayFormat(ConvertEmptyStringToNull = false)] public string isbn { get; set; }But when I submit form with empty field ISBN I have an error - ConstraintException: This property cannot be set to a null value.I have find that other people have the same problem and they say that debbugger in VS2010 works wrong - yes ?http://p2p.wrox.com/book-professional-asp-net-mvc-2/79788-constraintexception-unhandled-user-code.html#post259245http://efreedom.com/Question/1-3129080/Server-Side-Validation-REQUIRED-String-Property-MVC2-Entity-Framework-Workhttp://mvcmusicstore.codeplex.com/workitem/6604

Changing fields while updating an InfoPath Form to a SharePoint 2010 Document library

My document library has following EventReceiver: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Receivers ListTemplateId="101"> <Receiver> <Name>EventReceiverDocumentLibraryItemUpdating</Name> <Type>ItemUpdating</Type> <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly> <Class>EventHandling.EventReceiverDocumentLibrary</Class> <SequenceNumber>10000</SequenceNumber> </Receiver> </Receivers> </Elements> Updating a browser enabled InfoPath form in the document library fires following event: Public Overrides Sub ItemUpdated(ByVal properties As SPItemEventProperties) Try Me.EventFiringEnabled = False properties.ListItem("Lastname") = "Testperson" properties.ListItem.ParentList.ParentWeb.AllowUnsafeUpdates = True properties.ListItem.SystemUpdate(False) ' solution 1 properties.ListItem.Update() ' solution 2 properties.ListItem.UpdateOverwriteVersion() ' solution 3 properties.ListItem.ParentList.ParentWeb.AllowUnsafeUpdates = False Me.EventFiringEnabled = True MyBase.ItemUpdated(properties) Catch ex As Exception Me.EventFiringEnabled = True E

My Site - My profile - Edit my profile - required fields

Hi All, I'm having an issue with the Edit my profile page from my sites (my profile page).  When I setup required fields through the User properties setting in central admin and then go back to Edit my profile page and try and submit the form with nothing in a required field I get no error/warning that I must enter something in the required field. For example I've setup a policy to make 'Ask me about' required, I've then went into the User properties to confirm the 'Ask me about' property has the policy setting to 'Required'.  Go back to my edit my profile page and try and submit the form with nothing in the ‘Ask me about‘ field, and the form submits with no error or warning telling me that I've not completed 'ask me about'. Any ideas, am I doing something wrong?    

Missing/Required binary files on one Web-front-end after installed the CU aug 2010 hotfix?

Hi! I have installed the binary files for CU aug 2010 hotfix in a farm with two web-front-ends. In Central Administration you can see that on Web-front-end one (that also is hosting the Central Administration app) the binary files are missing but not on the second Web-Front-End. The installation went fine on both servers with the exception that I had to reboot the Web-Front-end one. When I try to run Psconfig to update my databases I get en error message like this in my command prompt. The upgrade command is invalid or a failure has been encountered. The server farm will not work with missing installs. Add "-cmd installcheck -noi nstallcheck" to the command-line to ignore this warning. The following is missing on web-front-end one: Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) Hotfix for Office (KB2352342) In the event log I get a lot of these errormessages too (EventID 3351): SQL database login for 'SharePoint_Config' on instance 'SqlAliasName' failed. Additional error information from SQL Server is included below. Login failed for user 'Domian\servername (one)$'. The thing is that the files is installed in the filesystems aswell as the dll files in the GAC on both servers. You can´t unistal

Foreach Loop Container.ForEachEnumerator.Properties[FileSpec] Exception -This occurs when an attempt

I run into the following 2 exceptions when I execute a package on SQL Server 2005 64 bit machine. The package fails when SQL Server version is 9.0.3310 which is a production box. I have tested it on 3 others development boxes with SQL version 9.0.1399, 9.0.3315 & 9.0.4053 and the package executes fine. I am unable to make a determination if this issue is related to SQL versions or a bug in the package design. I would like to understand the exception better before I request an SP3 & patches installed to upgrade it to version 9.0.4053 on the production box. I have scheduled jobs to run these packages and we are trying to locate Excel files on a drive using For Each Loop Enumerator. The packages are configured to use configuration files. Please note the destination directory does have the Excel files we are looking for. Source: Well_Test_Package Description: The package path referenced an object that cannot be found: "\Package\Daily Alloc Spread Sheet Foreach Loop Container.ForEachEnumerator.Properties[Directory]". This occurs when an attempt is made to resolve a package path to an object that cannot be found.  End Warning  Warning: 2010-08-31 00:41:13.66     Code: 0x80012017     Source: Well_Test_Package      Description: The package path referenced an object that ca

Missing fields when filter applied

Hello all, I hope someone can help as I can't figure it out!I shall try my best to explain. I have a report to show all sales quotes by status code (first group), then by Category code (2nd Group) and then by sales quote (3rd group) for the first 2 groups there is a coulmn to show no. of quotes using a CountDistinct expression. My issue is as follows, when running the report by month (Jan, Feb then Mar etc) and taking the total number of quotes for each month and adding them up manually gives a different total when running the report for alll months together (Jan-Mar). For example: Month      No. of Quotes (this is calculated using CountDistinct so not sure if this is the problem?) Jan:          10 Feb:          11 Mar:          8 Total:        29 When run for Jan-Mar I get a total of 25. Looking at the lines there are quotes missing (when running the report for all (Jan-Mar)) but when run by month the quotes appear?

ws-addressing 'Action' required message part not signed exception

I have a WCF client calling a Java-based service. The service vendor is supporting WCF clients. The WCF client binding uses authenticationMode="MutualCertificate", messageVersion="Soap11WSAddressing10" and the message is signed and encrypted (SignBeforeEncrypt). WCF, in this case, is automatically signing all the ws-addressing ( <Action>, <MessageID> and <To> ) headers. The message gets to the service and comes back with what appears to be valid encrypted data in the response BUT the client is throwing a "The 'Action', 'http://www.w3.org/2005/08/addressing' required message part was not signed" exception (mscorlib). Questions: Is there a way to NOT sign the ws-addressing headers in the request message while still using both signing and encryption (X.509 certs)? If the client DOES sign the ws-addressing headers in the request, is there a way to configure WCF to accept UNsigned ws-addressing headers in the response? If the answer is NO on both questions, I guess I will have to ask the service vendor to sign the ws-addressing headers in the response. Thanks.

Workflow data missing from Document Library

Hi, We have this strange situation where the workflow status is missing from document library views. Here is the situation: I have a Document Library with 3 OOTB approval workflows configured to start manually. Process is that user uploads a doc, start the first workflow, once it gets completed starts the second, and so forth. Now if I check the All Documents view of this Document Library, I can see these three workflows have 3 columns and that shows the status of the workflow - say "In progress", "Completed" etc. Now our users who use this document library and workflow complains that they cannot see these status of the workflow after some days. If a workflow is completed and status shows completed there, but after some days that column is blank. I've checked the modified data for the documents and this issue according to the user happens to documents that was uploaded 2 weeks back too, which means this doesn't happen to old document only. This document library has Major and Minor versioning enabled. Why does this happen, does SharePoint remove data for completed workflows? I checked the document's workflow page and its empty; nothing under running workflows and nothing under completed workflows. In Doc Library settings - Workflow settings I could not find an option View Workflow reports. That page has the following details: Use this page to view or

Required Field in Document Library

Say in a document library, you have custom required field and during file upload you didn't enter values for the required field. Now if you try to checkin the file from library item listing view, an runtime exception is thrown "You must fill out all required properties before checking in this document". In that case the expected behavior would be to show the edit window asking user to enter values for required fields. The error is reported on the thread here . The error is described more elaborately in this blog . Has anyone experienced the error before? Is it already reported issue?   Thanks, Sohel Rana http://ranaictiu-technicalblog.blogspot.com

RESTful WCF with session required throws exception

Interface code:   [ServiceContract(Namespace="", SessionMode=SessionMode.Required)]   public interface ITestService   {     [WebInvoke(UriTemplate = "",         Method = "POST",         BodyStyle = WebMessageBodyStyle.WrappedRequest)]     [OperationContract]     string ModInit(String arg); ... Service code: [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)] public class TestService : ITestService public string ModInit(String arg) ... Startup code: WebServiceHost host = new WebServiceHost(typeof(TestService),    new Uri("http://localhost:10000/test)); ... Client code: Uri address =  new Uri("http://localhost:10000/test"); var factory = new WebChannelFactory<ITestService>(new   WebHttpBinding { AllowCookies = true }, address); ITestService svc = factory.CreateChannel(); string resp = svc.ModInit("test"); ... This code throws a InvalidOperationException: Contract requires Session, but Binding 'WebHttpBinding' doesn't support it ... Does anyone know to get PerSession and SessionMode=SessionMode.Required working in the self hosted code above? Thanks, Mike

Excel fields linked to files in the document library do not update


We are having an issue with an Excel spreadsheet that is linked to several Excel documents in a document library.  Mutliple staff members update several "sub" spreadsheets with information that is rolled up to the "master" spreadsheet.  Excel appears to behave correctly in that if I open both the sub and master spreadsheets in my Excel window at the same time, the data in master gets updated.  If I just open the master, I have stale data.  I'm not sure SharePoint is to blame here, so I'll post this in the Excel forums as well, but any information or experience anyone has had with this would be fantastic.

Thanks in advance for any help/advice!

URGENT: Document Library Content Type not inheriting some fields from parent Site Content Type


I have a situation that has foxed me!! I have a site level content type that has 8 fields... I use this to create more content types at the site level and use these in multiple Document Libraries (I have 40 doc libs).  This works fine for 38 of the libraries.  But for 2 of them... 2 of the columns are not showing up on the document libraries.  These are user lookups fields.  I am not sure why it's not working in these libraries only!  When I use the same content type in another library... the inheritance does not break for these fields!

Anyone please provide some guidance on this?  I am using WSS 3.0 and SPD to do workflows.

On another note... the content type has a template (in excel) attached to it.  When I create the content manually using the content type from the New menu option, the template is used... however, when I try to add it using an SPD workflow, it creates a blank template... the content type template is not being used.

Please help... I am in a fix and need to release this application today!!!

SharePoint 2007 & Office 2010: not accepting data in required fields


We recently upgraded everyone to Office 2010, but we are still using MOSS 2007. Since the Office upgrade, I am getting numerous reports of problems with the 'required fields' of any document be editing (or newly created) when users try to save it back to the server.

These documents are throwing error messages indicating that some required properties 'are missing or invalid'. However all the needed info is indeed there. Even existing documents (that already have the field data in place) are giving the message when a save (or save as) is attempted. However, if the user saves a copy of the document locally and then manually uploads it via the SharePoint UI, it works fine. It appears to only come up when they use an Office app for editing and try to save it directly back to the server from the app. This process worked fine with Office 2007.

This only started when the Office 2010 upgrades were rolled out, and (as far as I know) no changes were made to SP at all. I have never seen this phenomenon before, so I would greatly appreciate any advice and/or education on this.  :)


Editing fields in Datasheet - Requiring Data that is NOT required


I am trying to mass update several metadata fields across all data in one library.  The library uses multiple templates, but the required columns are all the same.  I try to display just the required items, or even ALL the items in the datasheet.  Then when editing, I get the error message that some of the required data is not showing and I must add the required data.  I've triple checked my required fields in templates and the required fields in the view -- nothing appears to be missing.  Anyone have this happend and know a solution?  Editing each item one-by-one is going to be painful.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend