Tuesday, September 23, 2008

Bulk Editing of SharePoint List Items

Imagine you have a list with a “Confirm” yes/No field and you want a user to be able to view items and click a Check box on those items which are completed and click a Save button:

Bulkedit1

This saves the user opening each item in turn, changing the “Confirm” field and saving the item. This can be done using the SharePoint Designer and using a DataView. To do this:

  • Select File + New + Page to create a new ASPX page.
  • Choose “Create from Master Page…” and click OK and OK again to use the default master page..
  • Save the page as “BulkEdit.aspx” in the list’s folder, e.g. “ConfirmList” where the existing AllItems.aspx file exists.
  • “Create Custom Content” for “PlaceHolderMain” using the quick link:

Bulkedit2

  • Open the Data View >Manage Data Source . Click on “Data Source Library” pane on right of screen and click the list, e.g. “ConfirmList” and select Show Data:

Bulkedit3

  • Select the Insert Selected Fields as… button in the Data Source Details panel and select Multiple Item Form:

Bulkedit4

  • From the “Data View” menu select Edit Columns and remove all columns bar “Title” and “Confirm” (or whatever columns you want displayed).

You will now set the “Title” column to be read-only so that only the “Confirm” check box is editable.

  • Single click a “Title” edit box and click the “Common FormField Tasks” button (the greater than sign)or top right corner and select “Text” from the “Format as” list.
  • Save the file.
  • To test, navigate to the page, e.g. TestSite/Lists/ConfirmList/bulkedit.aspx.

Also take a look at http://office.microsoft.com/en-us/sharepointdesigner/HA101191141033.aspx, this uses an XML file as the data source rather than a SharePoint list.

A solution to "An unexpected error has occurred" in WSS v3

Debugging SharePoint can be problematic at times, it does like to hide debugging information from you. The bain of my life recently has been “An unexpected error has occurred” with nothing written to log files, trace or the event log.

Normally I can debug the problem with a little commenting & narrowing down of the problem, but today I have managed to get rid of that error screen completely.

The solution is to change a single entry in web.config, by modifying the line… ( change [ ] Braces to < Braces)

[SafeMode MaxControls=“200“ CallStack=“false“…

to…

[SafeMode MaxControls=“200“ CallStack=“true“…

You will also need to set custom errors to 'Off' .

[customErrors mode=“Off“/]

You will no longer see the “An unexpected error has occurred” error page and instead you get a lovely ’standard ASP.Net error page’ with the stack trace and everything…development has got that little bit easier!!

RootComponent types in solution.xml file in Dynamics CRM 365/2016

In Microsoft Dynamic CRM 2016/365 are you as confused as me when looking at the solution.xml from the solution export? looking at the xml a...