Fixing broken links in SharePoint List Forms

If you try to edit the any of the sharepoint forms (NewForm.aspx, EditForm.aspx,  DispForm.aspx) in SharePoint designer, then you may face the problem of broken links.

For example if a link to an item in a list should point to http://servername/sites/sitename/Lists/listname/DispForm.aspx?ID=2  but the item will take you to http://servername/ID=2.

The reason is SharePoint operates on a GUID system rather than a file system. So simply replacing the broken file with a backup file won’t work since SharePoint will look for a file with the proper GUID, not just the proper file name. Follow these simple steps.

1) Open the broken form and also another form in the same site which is working properly in the SharePoint designer.

2) Find the <WebPartPages:ListFormWebPart … to </WebPartPages:ListFormWebPart> in the broken form.

3) Replace that code from the form which is working fine.

4) The below code shows the lines that you have to change in the copied code.

<WebPartPages:ListFormWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{[Form GUID]}" ><Title>TITLE HERE</Title><ID>g_[Form GUID]</ID><ListName xmlns="">{[LIST GUID]}</ListName><ControlMode xmlns="">New</ControlMode><FormType xmlns="">8</FormType></WebPartPages:ListFormWebPart>

5) Create a new GUID or copy a GUID from some other form in the site which is working fine and replace it in the code. [In above code it shows as Form GUID.
You have to give this value at two places. First for __WebPartId and second for the <ID>g_[Form GUID]</ID>

Note that this is not the GUID of the list. You can create this GUID from Visual studio or many online tools are available to create one.

6) Provide the GUID of the list in the tag >ListName xmlns=””&gt;{[LIST GUID]}</ListName>

7) Now you have to fill the Control Mode and Form type in the following tabs.

<ControlMode xmlns=””>%5BControlMode%5D</ControlMode><FormType xmlns=””&gt;{FormType]</FormType>

Control mode and Form type differs for each form.

NewForm.aspx : ControlMode = New, FormType = 8
EditForm.aspx : ControlMode = Edit, FormType = 6
DispForm.aspx : ControlMode = Display, FormType = 4

8) Save the page and view the page in the browser. The broken links should be fixed.


16 thoughts on “Fixing broken links in SharePoint List Forms

Add yours

  1. Thank you SOO much. After I read that I had to delete the list and recreate it (700+ items, 50+ different views) my world collapsed. You are a life saver.

  2. This solution didn’t work for us as we destroyed our dispform and lost all links from the list as described above but the above solution didn’t work. We followed this link (same process but much more detailed steps and controls) and it works .. automatically sharepoint restored the links on all list items for viewing (which were going to root site) and now everything works.


  3. THANKYOU! You also saved my a!@

    I did have an issue where a multi-select control wouldn’t populate properly afterwards.
    Using underscores instead of dashes in the guid for g_[Form GUID] part seemed to fix it.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

Create a website or blog at

Up ↑

%d bloggers like this: