Wednesday, July 19, 2017

Unexpected Error When Replying or Forwarding an Email

Recently came across an interesting issue from one of my clients, they were working fine since around 2 years ago with no issues, using Dynamics CRM version 8.1. Suddenly they reported an issue about replying or forwarding one of the received emails by using CRM web and keep getting Unexpected Error when they tried to reply or foreword it!




First I asked them to clear the browser cache and trying to reply it, they did with no luck, I tried to reply it by using Sys Admin account and using multiple workstations, again I got the same error!
Before enabling Microsoft Dynamics CRM tracing, I tried to reply the email with an empty email body to check out if the body is the problem and I succeeded, it didn’t show any error and I replied normally. So I started searching for a weird symbols or codes in the body and I found the below symbols in the screenshot. 



I removed only those symbols and I replied with no errors, so I figured out that the symbols are the reason behind the error.

I started looking about this stranger issue on the internet and found many open cases regarding this issue on the Dynamics CRM community :



Hope this help!








Thursday, December 8, 2016

Dynamics 365 OP License Upgrade Path


Customers who are current on their Software Assurance Plan as of December 1, 2016 are entitled to upgrade the licenses from Microsoft Dynamics CRM 2015 to Microsoft Dynamics CRM 2016 as shown below upon renewal:


Qualifying Microsoft Dynamics CRM 2015 Licenses   Corresponding December Update for Microsoft Dynamics 365 (On-Premises) Licenses  (Software Assurance must be purchased for each CAL) 
Microsoft Dynamics CRM 2015 Professional CAL   1 Microsoft Dynamics 365 (On-Premises) Sales CAL
1Microsoft Dynamics 365 (On-Premises) Customer Service CAL  
Microsoft Dynamics CRM 2015 Basic CAL   1 Microsoft Dynamics 365 (On-Premises) Sales CAL
1 Microsoft Dynamics 365 (On-Premises) Customer Service CAL  
Microsoft Dynamics CRM 2015 Essential CAL   1 Microsoft Dynamics 365 (On-Premises) Team Members CAL  
Microsoft Dynamics CRM Workgroup Server 2015   Dynamics 365 (On-Premises) Servers included with CALs 
Microsoft Dynamics CRM Server 2015   Dynamics 365 (On-Premises) Servers included with CALs 




Wednesday, December 7, 2016

Installing and Enabling Organization Insights On Dynamics 365

The Organization Insights Solution for Dynamics 365 Online provides important adoption and use metrics for your Dynamics 365 organization, and tools to help you stay ahead of performance and support issues.

It is not released yet and it is not supported by Microsoft before it’s officially in a release, hopefully next quarter. 




What is Organization Insights?




For installing and enabling Organization Insights For Dynamics 365 Online: 


  • Go to Settings > Administration > System Setting.
  • Select Preview tab,then Set "Enable Organization Insights Preview" to Yes.

  • Go to Settings > Dynamics Marketplace.
  • In the search box, type "Organization Insights".
  • When you see the Organization Insights app, click Get.
  • Choose your organization then click Agree.


  • Then you will find Organization Insights (Preview) Solution added to your organization .


  • For accessing Organization Insights, go to Settings > Organization Insights.




Sunday, December 4, 2016

Dynamics 365 View Enhancement - Link Web Resources to a View Column

There a several new features in Microsoft Dynamics 365, now we can easily link Web Resources to a column in a view for adding icons and tooltips:




Sample:

The following sample code displays icons and tooltips based on one of three values (1: Hot, 2: Warm, 3: Cold) in the opportunityratingcode (Rating) attribute. The sample code also shows how to display localized tooltip text. For this sample to work, you must create three image web resources with 16x16 images in your Dynamics 365 instance with the following names: new_Hot, new_Warm, and new_Cold.
function displayIconTooltip(rowData, userLCID) {    
    var str = JSON.parse(rowData);
    var coldata = str.opportunityratingcode_Value;
    var imgName = "";
    var tooltip = "";
    switch (coldata) {
        case 1:
            imgName = "new_Hot";
            switch (userLCID) {
                case 1036:
                    tooltip = "French: Opportunity is Hot";
                    break;
                default:
                    tooltip = "Opportunity is Hot";
                    break;
            }
            break;
        case 2:
            imgName = "new_Warm";
            switch (userLCID) {
                case 1036:
                    tooltip = "French: Opportunity is Warm";
                    break;
                default:
                    tooltip = "Opportunity is Warm";
                    break;
            }
            break;
        case 3:
            imgName = "new_Cold";
            switch (userLCID) {
                case 1036:
                    tooltip = "French: Opportunity is Cold";
                    break;
                default:
                    tooltip = "Opportunity is Cold";
                    break;
            }
            break;
        default:
            imgName = "";
            tooltip = "";
            break;
    }
    var resultarray = [imgName, tooltip];
    return resultarray;
}

This results in displaying icons with tooltips in the Rating column that depend on the value in each row. The result could look like this:



Thursday, October 20, 2016

Automatically fill "Regarding" filed on Tracking any Sent Email from Outlook

Recently I had a requirement where one of our client’s team wanted a feature for automatically filling "Regarding" filed on Tracking any Sent Email from Outlook by looking for the associated record of the first email address in "To" field then set "Regarding" filed with the associated record if found.
I have covered their need by Plugin, below are the code :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Sdk;
using System.Data.SqlClient;

namespace CustomerPlugin
{
    public class SetRegardingFromOutlook : IPlugin
    {
        public void Execute(IServiceProvider serviceProvider)
        {
            IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
            var serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
            var service = serviceFactory.CreateOrganizationService(context.UserId);
            ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));
            try
            {
                
                if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)
                {
                    Entity entity = context.InputParameters["Target"] as Entity;

                    if (entity.LogicalName != "email")
                    {
                        return;
                    }
                    if (context.MessageName == "Create")
                    {
                   
                    if (entity.Contains("directioncode"))
                    {

                        if (((Boolean)entity["directioncode"]) == true)// Outgoing
                        {

                            if (entity.Contains("statecode"))
                            {
                                OptionSetValue entityStatusCode = new OptionSetValue();
                                entityStatusCode = (OptionSetValue)entity.Attributes["statuscode"];
                                if (entityStatusCode.Value == 3)//Sent
                                {
                                    var to = (EntityCollection)null;
                                    Guid partyId = Guid.Empty;
                                    
                                    if (entity.Attributes.Contains("to"))
                                        to = entity.GetAttributeValue<EntityCollection>("to");
                                                                      
                                        if (to != null && to.Entities.Count > 0) 
                                        {
                                            var party = to.Entities[0];
                                            var partyType = party.GetAttributeValue<EntityReference>("partyid").LogicalName;
                                            partyId = party.GetAttributeValue<EntityReference>("partyid").Id;
                                            entity.Attributes.Add("regardingobjectid", new EntityReference(partyType, partyId));
                                            service.Update(entity);
                                        }
                                     }


                            }
                        }
                    }
                }
            }
            }
            catch (Exception ex)
            {
                tracingService.Trace("Failed to Create Email From Outlook :  " + ex.Message.ToString());
                throw new InvalidPluginExecutionException(ex.Message);
               
            }
        }
    }

}


Below how to register this Plugin :




Hope its help!

Monday, August 15, 2016

Passing Query String To Dynamics CRM Global Search Page (Multientityquickfind.aspx)

I got that we can set Dynamics CRM Global Search as default landing page for specific users in Dynamics CRM from Debajit's Dynamic CRM Blog

I just wondered if I can use Global Search and passing a search value (Query String) then getting the result!
I opened the Global Search page out of CRM:

http://CRMSERVER/OrgName/multientityquickfind/multientityquickfind.aspx


By adding "?text=Abed" to the end of Global Search link 
"http://CRMSERVER/OrgName/multientityquickfind/multientityquickfind.aspx?text=Abed
it will passed "Abed" as a search value to the Global Search page :



Many Thanks to Debajit Dutta :)

Hope this helps!




Tuesday, May 24, 2016

CRM Online 2016 Update 1 - Create SLAs for custom entities and additional system entities



In all previous releases of Dynamics CRM, you could only create SLAs for the Case entity (record type). Now in Dynamics CRM Online 2016 Update 1 we can create SLAs for any custom entity and for any of the following system entities below:
  • All activity entities (such as Email, Task, and Appointment) except recurring appointments
  • Account
  • Contact
  • Invoice
  • Opportunity
  • Quote
  • Lead
  • Order
For more information : https://www.microsoft.com/en-us/dynamics/crm-customer-center/define-service-level-agreements-slas.aspx

Unexpected Error When Replying or Forwarding an Email

Recently came across an interesting issue from one of my clients, they were working fine since around 2 years ago with no issues, using Dyn...