As we all know, Windows SharePoint Services 3 has some cool features and allows us to make intranet applications quickly. However as with most software like this, it has some quirks that at times can be very maddening. One of which would be the Attachments feature in SharePoint lists. As I found out during development, I discovered that when you were to customized a listfrom be it edit, add or display, it WILL break the attachments feature in those forms. The words that come out for me were :

This form was customized not working with attachment.

The issue stems from the fact that when we create a customized from using SharePoint Designer 2007, we leave the auto-generated web part in the form but leave it hidden. That is what makes SharePoint think that we did not configure it to accept attachments. Microsoft’s support team did come out with patches and a work around this and can be found here.

Much to my annoyance, the fix did not work. While the upload button now works and allows you upload files and it even displays in the forms, it will give you this error :

“Failed to get value of the “Attachments” column from the “Attachments” field type control. See details in log. Exception message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)”

After some skull cracking and experimentation, it turns out the list form attachments field in the hidden web part and the customized problem was the source of all the issues. Changing this:

ListForm

to

ListForm2

 

After doing that, my form’s upload function worked flawlessly.

Hope this article helps somebody so they don’t have to bust their brains figuring this one out.

UPDATE

Apparently somebody else also had this issue and solved it the way I had. If only I discovered his article earlier :s

Anyway here is his blog entry : Custom listview with attachments – Jeffrey’s Blog

He also mentioned something about the first item not being able to attach files and come up with a solution there.

Sources :

Error message when you try to attach a file in a custom form on the Web site in Windows SharePoint Services 3.0: “This form was customized not working with attachment

Re-posting of an old blog post I wrote to my technical blog.

Advertisements