Monday, March 20, 2017

Users break dispform

In this particular case a user decided to throw away the main webpart of the dispform.aspx. This caused all kinds of problems since it was a calenderlist.
In this situationen it wasn’t possible to create a new list since a lot of coded things worked with listids. Theres no versioning of dispform.
I first tried to use restore to sitedefinitions, but this kind of change didn’t qualify for making restore for some reason.
So this what came instead.

1. Find a functioning “vanilla” dispform.aspx from a list of same type
2. Open Sharepoint Designer, goto website of above list, find list and copy ListID
3. Find dispform of functioning list and export to file. Save locally on computer
4. Open locally saved dispform with notepad. Find and replace listid of sourcelist with targetlist listID (in calenderar two matches)
5. Opensharepint Designer, goto website of broken list.
6. All Files>Lists><mylist>
7. Take a backup of dispform with export to file, just in case you mess up.
8. Import locally modified dispform
9. Changes take effect immediatly.


No comments: