Saturday, August 15, 2009

Another Custom Form Issue

After making a few changes to a custom form “NewForm_2.aspx” in WSS I realized that I needed to start over.  I deleted the form and copied “NewForm.aspx” again and renamed to “NewForm_2.aspx”.  When doing this you need to point WSS to the new form by using SharePoint Designer, right clicking the list, then using the “Supporting Files” tab browse to the newly created custom form:

image

image

The issue was when I deleted “NewForm_2.aspx” I broke the hook that WSS had to the form.  Even recreating the form did not reset the hook.  When clicking the “New” button on the list I got the error “Invalid Page URL:”.  Microsoft has a KB article on this:

http://support.microsoft.com/kb/935504

But that does not resolve the issue.  It states “To resolve this issue, delete the list, and then re-create it.”. This was not an option with a list with over 400 items and 50+ fields.  So I went on the hunt and finally found this article:

http://blogs.msdn.com/dszabo/archive/2007/02/20/custom-list-newform-aspx-ruined-in-wss-3-0.aspx

In the article they explain the issue and a few ways to resolve it without deleting the list and recreating.  The option that I found that worked was in the “POST-POST COMMENT: ALTERNATIVE RESOLUTION” section.  Here you just need to replace a piece of the HTML code used by WSS to build the page.  It worked like a charm!

No comments:

Post a Comment