Recently we came across a scenario where an end user accidentally deleted the List form web part from the Display form of a SharePoint custom list .This resulted in
1) Whenever user try to navigate to display form (either by hovering over list item in AllItems.aspx page or by clicking View Item in context menu of list item) user was directed to root web site.
2) Empty page even when accessed the page by hard-coding in url like site-url/lists/list-name/Dispform.aspx?ID=item_id
The ideal steps restore the list form web part is
1) Open the dispform.aspx of the list in SharePoint designer. Locate the cursor inside the loc:Main web part zone as shown below
2) Insert a List form Share Point control as shown below
3) Select the appropriate List and type of form as shown below
4) A new ListFormWebPart will be added to the page as shown below
5) Make a note of _WebPartID and ID parameter values from the newly added ListFormWebPart
In this case _WebPartID will be
ID will be
6) Now go to either edit form or new form of the list and take a copy of entire List form web part from it as shown below
7) In this copied List form web part replace _WenPartID and ID parameter values form the with the values copied in Step 5
8) Adjust the ControlMode and FormType values as per the form which needs to be corrected
9) Refer the below table for the appropriate values
Once these changes are incorporated the newly formatted ListFormWebPart is ready.
10) Now go the DisplayForm.aspx. Select the complete List form web part added in step 4 and remove it from the page. In that position add newly formatted ListFormWebPart
11) Save the DisplayForm.aspx page and close the designer.
12) Now ListFormWebPart is restored in the page and you can access DisplayForm.aspx as before.
Note : The same steps will work to restore deleted ListFormWebPart in EditForm.aspx and NewForm.aspx of the list. In that case values for ControlMode and FormType have to be selected appropriately as shown in table above.
Wednesday, June 27, 2012
Subscribe to:
Posts (Atom)