Pages

Tuesday, November 2, 2010

SharePoint 2010 Runtime Error: “You must fill out all required properties before checking in this document."

In SharePoint 2010, you may find two ways the file upload in a library works based on whether you have custom required fields or not.

File upload in Document Library with no custom required field

By default when a library doesn’t have any required field, after uploading a document, the upload window redirects u to the library view page. So in this case there are two steps as shown below:

image

Figure 1: Two steps file upload process for library with not custom required fields

 

 

File upload in Document Library with custom required field

However, if you add a field as required then after uploading a document you will be shown an intermediate dialog window where you can provide values for required fields. The intermediate dialog is shown below:

image

Figure 2: For library with Required fields, user can see this dialog just after file upload

Now in this window you can enter values for required fields. But what if you don’t enter required field values and just cancel the dialog? In this case the file is checked out by you. You might expect that the dialog should be not canceled without entering required field values. But maybe SharePoint team just wanted to let the user to fill the required fields later on, without forcing to do so in the dialog immediately.

 

 

What if user leave the file checked-out by not entering values for required fields?

Now if user doesn’t fill the required fields on the dialog shown on figure 2 by clicking cancel button, then the file is not checked in and kept checked-out by the user who uploaded the file. Now if you select the ‘document’ item in library you can find the check-in button is enabled (shown in the image below) which means the document is checked-out.

image

Figure 3: File without filling required fields is checked-out

What if you try to check-in the file?

Now if you try to check-in the file by clicking “Check In” (as in figure 3), you will get an runtime exception as shown below:

image

Figure 4: Runtime exception on file check-in

What would be the expected behavior?

So what would be the expected behavior if user clicked on “Check In'” shown in figure 3? As I can expect that the window shown on figure 2 would be presented to let user know that the required fields are missing. So if user still cancels the dialog the file would be in checked-out state. If user put values for required fields and save then the file can be checked-in.

7 comments:

  1. Hi there.

    I have a similar issue.
    I have a required field and when i try to move an office file through explorer view I got a invalid parameter error.
    I just got that error if I try to move files that are already inside Sharepoint, with the required field filled.
    If i try to move an Office file in my computer to SharePoint library, i get the behaviour you describe in the post.

    Do you how to solve this?

    Thx

    ReplyDelete
  2. Adding more details:

    In some computers, i get a permission error instead the parameter error, although I'm sure it's not a permission issue (as I can paste fresh office files or non-office files)

    I used Fiddler to check the traffic and I got 401 erros.

    Pretty sure it's a WebDAV issue...

    ReplyDelete
  3. No I hadn't found any solution but I reported the bug in SharePoint forum. If the bug is real then maybe SharePoint team will take a look and fix it.

    ReplyDelete
  4. We are facing same issue Sohel, If you have resolution please provide to us.

    ReplyDelete
  5. I have the solution: you have to open the site in Sharepoint Designer, find that page, right click -> Properties->Set the title to whatever you want (there is something already here, so change it), click OK. Now you're able to check in the file.

    ReplyDelete
  6. Hey,

    As you said "Figure 2: For library with Required fields, user can see this dialog just after file upload".

    My issues is i don't want to show up file in library after upload file without filling required fields.

    May i know how does it possible to do?

    Thanks,
    mini.

    ReplyDelete
  7. Just make "Title" Column as optional, this will work fine after that.

    ReplyDelete

Note: Only a member of this blog may post a comment.