When administering a SharePoint farm, you’re bound to have a situation come up where you’re low on diskspace for a site with increasing content. You may want to move a content database to another drive on your SQL server in order to gain some free space back. Fortunately, this isn’t too hard to accomplish using the following steps and should work in SharePoint 2010 or 2013:

1. Quiesce the Farm – This stops people from being able to make changes to your system while you are working on it.

  • To quiesce SharePoint 2010, use stsadm: stsadm -o quiescefarm -maxduration n

2. Backup any database that you are moving

3. Turn off SharePoint Services to unlock the databases

You can either stop the services through the Central Administration or you can do it in the Services Console. To stop the connections to the existing databases, stop the following services:

  • Office SharePoint Search Service
  • Windows SharePoint Services Administration
  • Windows SharePoint Services Search
  • Windows SharePoint Services Timer
  • Windows SharePoint Services Tracing
  • World Wide Web Publishing Service

4. After the services are stopped, detach the database(s) that you are looking to move.
5. After detaching the database(s), copy them to your new location.
6. Reattach your database(s)
7. Restart the services
8. Unquiesce the farm:

  • To unquiesce SharePoint 2010, use stsadm: stsadm -o unquiescefarm

Some of this content is sourced from Microsoft Technet

Starting Screen View

Starting Screen ViewSecure Folder is a small application written solely to allow the user to hide a folder (and the contents) from the eyes of family and friends. It also stops the files from being indexed. The password to open the application is known only to the primary user, so no one else can see the name or location of the hidden folder. No installation needs to take place in order to use the application. Simply open the application to begin using it.

Logged In ViewWhen you open the program, you’ll be presented with a login screen. If this is your first time using the program, the default password will be password in lowercase. Upon logging in, you should set your own password using the Set Password menu option. You cannot reuse the default password but there are no other constraints.

By default, the folder path is set to C:\SecureFolder. If the folder doesn’t exist, it will be created the first time you click on the Hide button. If you’d like to change the folder location, click the Set Path menu option before clicking the Hide button.

Secure Folder Download

As a CRM administrator, you may come across the following error in your CRM Event Logs:
“Query execution time of XX seconds exceeded the threshold of 10 seconds”

This is said to merely be informational. If you’d like to see the setting in your CRM’s SQL database, run the following script against your CRM’s database:

SELECT IntColumn FROM MSCRM_CONFIG..ServerSettingsProperties WHERE ColumnName='LongQueryThresholdInSeconds'

It should return the value you had seen in the warning. To lengthen the timeout to stop the error, you can run the following script against your database:

UPDATE MSCRM_CONFIG..ServerSettingsProperties SET IntColumn = '20' WHERE ColumnName='LongQueryThresholdInSeconds'

We had a need to send custom workflow emails that included all attachments from the Notes section of Opportunities in Dynamics CRM 2015. This is not an out of the box functionality. It requires the development of a plugin that must be registered in CRM to achieve the desired results. I’ll try to be thorough in my explanation, because I know it can be tough to put together the bits of information that you will find on this topic if you’re just starting out developing for CRM.

It is important that I note here that I obtained most of the information needed to create this from this article. It was written for doing similar functionality for a single attachment in the Accounts entity, but I needed a way to get every attachment from the Opportunity entity. One of the commenters posted what they had done unsuccessfully in the comments section and I merely combined the code from the two people and made a working Opportunity plugin that includes all attachments – instead of only the first one. You’ll notice that I didn’t even bother fixing the spelling error on “attachement”. Feel free to do so in your own project.

  • You’ll need the Dynamics CRM 2015 Software Development Kit. You can download it here. Without this, you won’t have the required DLLs for adding as references to your project in Visual Studio and you won’t have the plugin registration tool (SDK folder\SDK\Tools\PluginRegistration).
  • You will also need Visual Studio, obviously.
  • You may also need to install .NET Framework 4.5.2, if you haven’t already.
  1. Create a new project in Visual Studio. The settings should look like the following:
  2. Step1

  3. Rename the class file to SendEmailWithAttachement.cs to match the file.
  4. Right click on your project name (EmailAttachment), below your solution name in the Solution Explorer, click Properties. Click on the Signing tab. Check the box to Sign the assembly. If you don’t do this, you’ll get errors when you try to register your plugin with CRM. You don’t need a password, so make sure you clear that box. It should look like below:
  5. step2

  6. You’ll need to right click on References in the Solution Explorer and Add Reference a few times. Some will be part of Assemblies Framework and other you need to browse and obtain from the SDK. Be sure you have similar to the following screenshot when you are done:
  7. step3

  8. Now you’ll want to click on the SendEmailWithAttachement.cs class file to open it. Paste the following code in to it:
  9. using System;
    using System.Linq;
    using System.Activities;
    using Microsoft.Xrm.Sdk;
    using Microsoft.Xrm.Sdk.Workflow;
    using Microsoft.Xrm.Sdk.Query;
    using Microsoft.Crm.Sdk.Messages;

    namespace EmailAttachment
    public class SendEmailWithAttachement : CodeActivity

    //define output variable
    public InArgument SourceEmail { get; set; }

    protected override void Execute(CodeActivityContext executionContext)
    // Get workflow context
    IWorkflowContext context = executionContext.GetExtension();
    //Create service factory
    IOrganizationServiceFactory serviceFactory = executionContext.GetExtension();
    // Create Organization service
    IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
    // Get the target entity from the context
    Entity OpportunitiesID = (Entity)service.Retrieve("opportunity", context.PrimaryEntityId, new ColumnSet(new string[] { "opportunityid" }));

    AddAttachmentToEmailRecord(service, OpportunitiesID.Id, SourceEmail.Get(executionContext));

    private void AddAttachmentToEmailRecord(IOrganizationService service, Guid OpportunitiesID, EntityReference SourceEmailID)
    //create email object
    Entity _ResultEntity = service.Retrieve("email", SourceEmailID.Id, new ColumnSet(true));
    QueryExpression _QueryNotes = new QueryExpression("annotation");
    _QueryNotes.ColumnSet = new ColumnSet(new string[] { "subject", "mimetype","filename","documentbody" });
    _QueryNotes.Criteria = new FilterExpression();
    _QueryNotes.Criteria.FilterOperator = LogicalOperator.And;
    _QueryNotes.Criteria.AddCondition(new ConditionExpression("objectid", ConditionOperator.Equal, OpportunitiesID));

    EntityCollection _MimeCollection = service.RetrieveMultiple(_QueryNotes);

    if (_MimeCollection.Entities.Count > 0)
    for (int i = 0; i < _MimeCollection.Entities.Count; i++) { //we need to fetch first attachment Entity _NotesAttachment = _MimeCollection.Entities[i]; //Create email attachment Entity _EmailAttachment = new Entity("activitymimeattachment"); if (_NotesAttachment.Contains("subject")) _EmailAttachment["subject"] = _NotesAttachment.GetAttributeValue("subject");
    _EmailAttachment["objectid"] = new EntityReference("email", _ResultEntity.Id);
    _EmailAttachment["objecttypecode"] = "email";
    if (_NotesAttachment.Contains("filename"))
    _EmailAttachment["filename"] = _NotesAttachment.GetAttributeValue("filename");
    if (_NotesAttachment.Contains("documentbody"))
    _EmailAttachment["body"] = _NotesAttachment.GetAttributeValue("documentbody");
    if (_NotesAttachment.Contains("mimetype"))
    _EmailAttachment["mimetype"] = _NotesAttachment.GetAttributeValue("mimetype");

    SendEmailRequest SendEmail = new SendEmailRequest();
    SendEmail.EmailId = _ResultEntity.Id;
    SendEmail.TrackingToken = "";
    SendEmail.IssueSend = true;
    SendEmailResponse res = (SendEmailResponse)service.Execute(SendEmail);



    At this point, if you have any underlines or errors showing in the code, you are likely missing a reference.

  10. Build your plugin at this point by clicking on Build – Build Solution. If it builds correctly and you have no errors, you should be ready to register your plugin in CRM.
  11. Inside of the SDK folder that you unzipped, open SDK\Tools\PluginRegistration. Run the PluginRegistration.exe file to open the tool.
  12. Click on the Create New Connection button. If you’ve never run the registration tool, you’ll need to enter your local settings. Select On-premises. Enter the Server name. If you use SSL, make the port 443 and check the box to Use SSL. You’ll probably want Authentication Source to be Active Directory and then enter your user and Domain information. Click on the Login button. If all is correct, the system should login and provide you with the registration tools.
  13. Click on the Register button then on Register New Assembly.
  14. In the Register New Assembly window, use the browse button to locate and select your newly built DLL file. It should look like the following:
  15. step4

  16. Click on the Register Selected Plugins button. If all goes well, you’ll now see the new plugin in the list of Registered Plugins & Custom Workflow Activities. You can close out of the registration tool at this point.
  17. All that is left is to open CRM and build your new workflow.

  18. Go to Settings – Processes. Click the New button to start a new workflow. Give it a name, set Category to Workflow and select Opportunity for the Entity. Be sure that New blank process is selected and click the OK button. It should look similar to below:
  19. step5

  20. At this point, just create a condition that is needed by your workflow. Add steps to process when meeting those conditions. I’ll skip over this as everyone’s will differ, but I will point out that to make this work, you want to Add Step, select Create Record and then select Email for the Create dropdown list.
  21. Click on the Set Properties button and enter the information in to your email form that you wish to send.
  22. Click on Add Step and select CRM_NoteAttachments ( and then EmailAttachment.SendEmailWithAttachement or whatever your name was for your plugin. Mine is shown below:
  23. step6

  24. Click on Set Properties and configure like the following:
  25. step7

  26. Click on Save and Close and then you’ll have your basic workflow, ready for activation and testing. Here is the final view of a test workflow:
  27. step8

    Hopefully, this will fill enough gaps in the process for you to figure out the process for this. It took a lot of reading for me to get this working properly, using multiple forum threads. I just wanted to lay it out from beginning to end so that it saves someone else some time. Please check out the thread that I got most of the code from as well. That person deserves a lot of credit for his work.

One of the things that is not very intuitive about CRM 2015 is how to create a dependent option set. There are many articles on the topic for CRM 2011 and 2013, but not many specific to CRM 2015 at this time. Not much has changed, but most articles you find won’t give you all the steps it takes to understand the process. For example, many articles won’t bring up the need for the Software Development Kit – which provides you with the example JavaScript code for this task.

The following article is what I found to be a great example of the process of creating a dependent option set and it works in CRM 2015:

I won’t rewrite that article for 2015. What I want to point out is that you’ll need to tweak this process if you require a dependent option set in more than one form type. For example, if you need a different dependent option set in your Account and Opportunity forms, you cannot share both option sets within the same XML file. It kind of works, but you’ll be plagued by “Error on the page” messages in your browser with every refresh – referencing null values and line 68 of your JavaScript file.

In order to make this work (error free), you’ll need to create an XML file with just the appropriate dependent option sets to each form type. The one exception seems to be if you’re using the exact same option sets between forms, using the same values. Inside of you Form Properties for each form, you’ll simple set the appropriate XML file that you have registered. I have an XML file for Opportunities and also one for Accounts.

Hopefully this will save people time when they come upon the issue. The errors occur at the form level of page load, without even accessing the option sets for selection.

In our old Microsoft Dynamics CRM 4 system, date formatting was done on the back-end, by utilizing workflows and added custom DLLs. This caused a lot of extra workflow rules to screen people by location, in order to ensure that European employees see proper date formatting.

In Microsoft CRM 2015, everyone will be able to set their own date options easily. This translates to how users see dates on Opportunities, Contacts, Accounts, and even the emails they receive from the system.

To set your date options, click on the gear icon in the upper right corner and click Options.


In the Options window, click on the Formats tab and select the date formatting you would prefer. Click OK to store your selection.


One of the scenarios that I ran in to with configuring Microsoft CRM 2015 is changing then DNS and URL of the site. When I installed and configured it, I didn’t have a final idea planned for a URL. Development started to figure out if I could jump versions from Dynamics 4 all the way to CRM 2105 by rebuilding the needed fields and workflows, export the data from the old system and import desired data back in to the new system. I found that the process worked well for skipping the other versions, but I was further along than I wanted to be to restart. If I could change the information, I could save hours of reproduction. There wasn’t a lot of 2015 information available on this topic, but the process was possible in versions 2011/2013. Using that information ended up working well. You can see an example here

Step 1:
– Update the DNS entry that points to the server IP address. This may need to be done by your Infrastructure team.

Step 2:
– Update your IIS bindings for the site to utilize the new URL

  • Open IIS Manager and select the existing Microsoft Dynamics CRM site
  • Click the Bindings link in the Action Panel on the right
  • Select the binding to modify and click on Edit
  • Modify the host name and port to reflect the new values
  • Close the IIS Manager

Step 3:
– Update the ServerURL registry entry with the new URL you want to use.

  • Open Regedit and browse the folders to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
  • Update the ServerURL value to your newly desired URL
  • Close the registry editor.

Step 4:
– Modify the settings for CRM from within the Microsoft Dynamics CRM Deployment Manager

  • Open Microsoft Dynamics CRM Deployment Manager
  • Right click on Microsoft Dynamics CRM at the top of the left pane and click Properties
  • Select the Web Address tab and modify the addresses shown to reflect your new URL
  • If you’re configuring for SSL, be sure to select HTTPS. Be sure that your certificate was selected and HTTPS is configured in Step 2.
  • Click OK to close the window and then close out of Deployment Manager.

Step 5:
– Restart the Microsoft Dynamics CRM Asynchronous Processing Service (or just restart the server). I had to restart the server, because I was generating a Generic Error on the homepage.

Step 6:
– You may require additional registry changes if they don’t exist. You may want to disable loopback on the server.

  • Open Regedit and browse the folders to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  • Right-click Lsa, click on New, and then click DWORD Value.
  • Type DisableLoopbackCheck, and then press ENTER. Right-click DisableLoopbackCheck, and then click Modify. In the Value data box, type 1, and then click OK.
  • Close the registry editor and restart the server.
  • These steps should get CRM 2015 working on the new URL, using the new DNS name. If you run in to issues, try searching on the same issue in 2011/2013 versions and you can find more details on the steps required. A good many of the server solutions for 2011/2013 versions are also appropriate for 2015.

Recently, I ran in to an issue where SharePoint would error out when trying to save a page edit. Even if you just went to edit mode and clicked to save and close, it would error out and provide a correlation ID without having made a change.

Using ULS Viewer, I took a look at the correlation ID to find that the error was, “The SPListItem provided is not compatible with a Publishing Page.” This was a new error to me, so I started looking for more information. Googling it, I found several references and explanations on what needed to be done, but not many sources really explained the process of fixing it clearly.

To fix this issue, you need to disable and re-enable the Publishing service for SharePoint, using Powershell. Open Powershell on the SharePoint server as an administrator. Type the following commands:

Disable-SPFeature –Identity Publishing –url http://Site_Name_Here

Wait for the process to complete successfully, then re-enable it:

Enable-SPFeature –Identity Publishing –url http://Site_Name_Here

Assuming the process completes successfully, you should be able to edit and check-in the page again without any problems. It is unclear to me what causes this issue, but at least it’s an easy fix.

We recently downgraded SQL Server versions from Enterprise to Standard, due to Microsoft changing their licensing rules. We were not using any features of Enterprise, so we moved from SQL 2012 Enterprise to SQL 2012 Standard. There are many knowledge-base articles available by Google search on how to accomplish this downgrade.

What you might not know, is that SharePoint may be using the data compression feature of SQL Enterprise without you knowing. SharePoint 2010 tends to use data compression, if able, for Web Analytics and the Search Service Application Store. If you don’t know this ahead of time, you will notice when SharePoint searches break.

After a downgrade of SQL from Enterprise to Standard, your affected databases will be inaccessible within SSMS. If you know the location of the database, you will need to copy the .MDF and .LDF files for the Search_Service_Application_PropertyStoreDB_[GUID HERE] database to an Enterprise installation to run queries on it and disable compression for the affected tables. Alternatively, you can remove your search service and reconfigure it. There are many articles on doing this available upon Google search.

To fix the Web Analytics Service, the only fix I found was to remove the functionality in Central Administration and set it up from scratch. I was not able to fix it the same way as the Search Service to maintain existing information.

Sometimes, it’s necessary to copy hundreds of files to a picture library in SharePoint. SharePoint 2007 had an easy way to do this in Explorer view. The feature still exists in SharePoint 2010, but it is accessed in a slightly different manor.

From within the picture library, click on Actions – Open with Windows Explorer. When the window opens, you cand rag and drop as many files as needed, without the worry of the 100 file limit.