The server was unable to save the form at this time. Please try again. Error in Document Library (SharePoint 2013)


I was getting the following error while trying to edit properties of a document in the document library in SharePoint 2013.

As suggested restarted SharePoint Search Host Controller service. Stopped few services to release some memory. Nothing helped.

Finally followed these steps

  • Create a new Document Library accepting all defaults
  • Add a document to the library
  • Edit the properties of the document and save.
    RESULT: The server was unable to save the form at this time. Please try again.
  • Enable ‘Manage content types’ in the library setting.
  • Add the ‘Link to a document’ content type.
  • Edit the properties of the document and save.
  • RESULT: Fixed

The helpful post

Hope it helps.


“This content cannot be displayed in a frame” error while hosting SharePoint 2013 pages in CRM


I was getting the above error while trying to hosting the SharePoint 2013 online web part page inside an iframe within CRM’s Form.

The following post came to the rescue

specifically the following tag

<WebPartPages:AllowFraming runat=”server” />

Hope it helps.

Searching SharePoint 2013 online portal from within CRM 2011 online


  1. Open the SharePoint Site and create a custom Web Part Page using SharePoint Designer 2013

  1. Edit the created page in Advanced Mode

  1. Add the AllowFraming tag to the web part page to allow the page to be iframed from within CRM’s Form

Select preview in browser



  1. Select Page à Edit Page



  1. Add Search Web Parts


  • Search Box in the Header
  • Refinement in the Left Column
  • Search Results in the Body


  1. Note the url of the Custom Search Page

  1. Now we can use the above url in the Iframe within our CRM. Here k would be the query string parameter to which search keyword would be passed. We can dynamically set the value of the parameter k through JavaScript in the onload of a particular entity’s form to display the corresponding results in the CRM.

  1. Search page within Case Form in CRM

Hope it helps.





Sample code to update user’s calendar programmatically (work hours) in CRM 2011


Below is the code that we can use to update user’s work hours for a specific day. Here we are setting the work hours of the user to be starting from 2 to ending at 7 p.m. for 1st of April.

IServiceManagement orgServiceManagement =
 ServiceConfigurationFactory.CreateManagement(new Uri(""));

AuthenticationCredentials authCredentials = new AuthenticationCredentials();
 authCredentials.ClientCredentials.UserName.UserName = "";
 authCredentials.ClientCredentials.UserName.Password = "password";
 AuthenticationCredentials tokenCredentials = orgServiceManagement.Authenticate(authCredentials);

OrganizationServiceProxy organizationProxy = new OrganizationServiceProxy(orgServiceManagement, tokenCredentials.SecurityTokenResponse);
 // Get the user id
 Guid userid = ((WhoAmIResponse)organizationProxy.Execute(new WhoAmIRequest())).UserId;

// Get the calendar id of the user
 Entity systemUserEntity = organizationProxy.Retrieve("systemuser", userid, new ColumnSet(new String[] { "calendarid"}));

// Retrieve the calendar of the user
 Entity userCalendarEntity = organizationProxy.Retrieve("calendar", ((Microsoft.Xrm.Sdk.EntityReference)(systemUserEntity.Attributes["calendarid"])).Id, new ColumnSet(true));

// Retrieve the calendar rules defined in the calendar
 EntityCollection calendarRules = (EntityCollection)userCalendarEntity.Attributes["calendarrules"];

// Create a new inner calendar
 Entity newInnerCalendar = new Entity("calendar");
 newInnerCalendar.Attributes["businessunitid"] = new EntityReference("businessunit", ((Microsoft.Xrm.Sdk.EntityReference)(userCalendarEntity["businessunitid"])).Id);
 Guid innerCalendarId = organizationProxy.Create(newInnerCalendar);

// Create a new calendar rule and assign the inner calendar id to it
 Entity calendarRule = new Entity("calendarrule");
 calendarRule.Attributes["duration"] = 1440;
 calendarRule.Attributes["extentcode"] = 1;
 calendarRule.Attributes["pattern"] = "FREQ=DAILY;COUNT=1";
 calendarRule.Attributes["rank"] = 0;
 calendarRule.Attributes["timezonecode"] = 190;
 calendarRule.Attributes["innercalendarid"] = new EntityReference("calendar", innerCalendarId);

// starting at 12:00 on 1 April
 calendarRule.Attributes["starttime"] = new DateTime(2013, 4, 2,0,0,0,DateTimeKind.Utc);

// assign all the calendar rule back to the user calendar
 userCalendarEntity.Attributes["calendarrules"] = calendarRules;
 // update the user calendar entity that has the new rule

Entity calendarRule1 = new Entity("calendarrule");

// duration of 5 hours
 calendarRule1.Attributes["duration"] = 300;
 calendarRule1.Attributes["effort"] = 1.0;
 calendarRule1.Attributes["issimple"] = true;

// offset 120 i.e. 2 hours from start time (12:00)
 calendarRule1.Attributes["offset"] = 120;
 calendarRule1.Attributes["rank"] = 0;
 calendarRule1.Attributes["subcode"] = 1;
 calendarRule1.Attributes["timecode"] = 0;
 calendarRule1.Attributes["timezonecode"] = -1;
 calendarRule1.Attributes["calendarid"] = new EntityReference("calendar", innerCalendarId);

EntityCollection innerCalendarRules = new EntityCollection();
 innerCalendarRules.EntityName = "calendarrule";

newInnerCalendar.Attributes["calendarrules"] = innerCalendarRules;
 newInnerCalendar.Attributes["calendarid"] = innerCalendarId;

Hope it helps.