Lars Nielsen's Discoveries

January 31, 2011

Custom EditForm.aspx page error “The page you have selected does not contain a reference to the correct SharePoint list”

Filed under: Customization,SharePoint,Troubleshooting — Lars Nielsen @ 10:52 pm
Tags: ,

If you are trying to create a custom property editor screen for a document library (to replace the default EditForm.aspx page), you might follow Jan Tielens instructions on how to do it for a normal list.  That works fine for a normal list, but when you try to do the same with a document library, when you click the Apply button in the Supporting Files tab in SharePoint Designer you’ll get an error:

The page you have selected does not contain a reference to the correct SharePoint list. Please select another page

To avoid this you need to make sure that the original ListForm web part is still there in the markup on the page, but you make it invisible and add a custom list form web part above it.  But you also need to remember that how to create your custom edit page is important as well.  You might think the easy way is to do this:

  • Open the site in SharePoint Designer
  • Select the EditForm.aspx in the Forms folder of the document library
  • Right click – Copy
  • Select the Forms folder
  • Right click – Paste

That will create a copy of the EditForm.aspx file that you can rename and work with but you keep getting the error above when you try to apply it to the document library.  So instead create the custom editor page  like this:

  • Open in SharePoint Designer
  • Open the EditForm.aspx in the Forms folder of the document library
  • Save it with a different filename

Now start editing your new page.  Remember not to delete the existing ListForm web part, just make it invisible.

Advertisements

3 Comments »

  1. Thanks, it works!!!

    Comment by Mauricio — February 21, 2011 @ 6:14 pm

  2. Hi. I created a new Edit form to replace the one we have but I’m still getting the same error message… I placed the new Form in the same location section in Designer and renamed the original edit form….What am I missing?

    Comment by Rocco — April 5, 2012 @ 7:08 pm

  3. Hi Rocco – did you change the list properties to use your new form? Also if you want to use a custom list form web part you need to keep the original ListForm web part on the page (but make it invisible). I’m not sure if this applies to SP 2010 as well?

    Comment by Lars Nielsen — April 5, 2012 @ 8:41 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: