Archive

Archive for February, 2015

Normal user cannot save SharePoint taxonomy fields

Hi Folks

Nice simple one this.

Users could edit a list and select taxonomy terms but when the saved the item the taxonomy terms were not saved.

Simple answer the hidden taxonomy list, which maintains the item to taxonomy term mappings, had its permissions set so that normal users could not write to it.

Then users can save taxonomy terms to managed metadata fields.

Cheers

Sebastian

Categories: SharePoint 2013

Display Error Message from an Office 365 / SharePoint Online Remote Event Receiver

Hi Folks

This one took a lot of time and eventually a real Eureka moment.

When the web gives you no clues and google / bing is not helping at all you begin to wonder if its just you.

The problem is that we have an App that needs to act when items are added, updated and deleted from a list in the host web.

Not a problem, we monkey up a Remote Event Receiver, attach it via code in the App Installing Event Receiver, and then trap the events we are interested in.

  • Item Adding, add values to the SQL tables in our App, works a treat.
  • Item Updating, add values to the SQL tables in our App, works a treat.
  • Item Deleting, prevent the item being deleted, works but doesn’t display our message telling you why you can’t delete the item.

The code looks like this:

public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
{
    var result = new SPRemoteEventResult();
    switch (properties.EventType)
{
case SPRemoteEventType.ItemDeleting:
result.ErrorMessage = “Enhanced Records Manager prevents classes / folders / parts or records being deleted, you must use a disposal to remove them.”;
result.Status = SPRemoteEventServiceStatus.CancelWithError;
break;
}
return result;

}

Problem is that when you delete the item all you get is a blank screen when you do it from a list view.

The delete is stopped but no message displayed just a blank screen.

However when you do it from the View Properties page then the delete is stopped and the error message is displayed.

Much head scratching, three hours of it until…

Minimal Download Strategy does odd things to displays especially from Event Receivers in On-Premises SharePoint could it be the problem here?

Turn it off and?

Error messages are displayed.

So now when you install our app it checks for the Minimal Download Strategy site feature and if its activated then deactivates it.

Minimal Download Strategy
A technique that delivers a faster and more fluid page navigation experience, in pages and site templates that support it, by downloading and rendering only those portions of a page that are changing.

Hope this helps someone else out.

Cheers

Sebastian

Categories: Uncategorized

Cannot repair or uninstall SharePoint

Hi There

Very simple one this.  I was restoring a backup in a DR trail and had a few issues.

No problem I thought I’ll uninstall SharePoint and just start again.

Disaster, SharePoint would NOT uninstall.

So I tried to repair it.

It gave the following error:

Product: Microsoft SharePoint Portal English Language Pack — Error 1706. An installation package for the product Microsoft SharePoint Portal English Language Pack cannot be found. Try the installation again using a valid copy of the installation package ‘spsmui.msi’.

After much head scratching I realised that I had moved the original installation package from the D: drive to the E: drive to save space.

I moved it back and could then repair it.

Once repaired I could use Control Panel Uninstall Programs to remove it.

Hope this helps.

Sebastian

 

Categories: Uncategorized