Query execution time of 60 seconds exceeded the threshold of 10 seconds warning in CRM 2013.


Query execution time of 60 seconds exceeded the threshold of 10 seconds warning in CRM 2013.

We were getting the below warning in one of our test environment

On analyzing figured out that one of the plugin was using retrieve with ColumnSet(true) option i.e. retrieving all the columns of the entity which was not required in this case.

Fetching only the required columns fixed the warning.

The other option could have been indexing or increate the value for LongQueryThersholdInSeconds column in ServerSetingProperties table of MSCRM_Config.

Helpful posts

http://blog.edgewater.com/2013/01/07/microsoft-dynamics-crm-querying-data-using-late-binding-versus-early-binding/

http://www.dynamicscrmpros.com/mscrmplatform-warning-in-event-viewer-in-microsoft-dynamics-cr-event-id-17972/

Hope it helps..

 

Plugin when a case (incident) is resolved in CRM 2013.


Hi,

To fire a plugin when an incident is resolved we need to register the plugin in

Close message for the incident entity.

And in the input parameters of the context we need to check for IncidentResolution.

This entity is a special entity that holds the information about the incident record that is being closed.

The sample plugin below gets the actual end attribute value of IncidentResolution and subtracts created on attribute value of Incident to get the duration and updates the duration (custom field) in the case being resolved.


public void Execute(IServiceProvider serviceProvider)
{
// Obtain the execution context from the service provider.
IPluginExecutionContext context = (IPluginExecutionContext)
serviceProvider.GetService(typeof(IPluginExecutionContext));

if (context.InputParameters.Contains("IncidentResolution"))
{
Entity incidentResolution = (Entity)context.InputParameters["IncidentResolution"];
Guid relatedIncidentGuid = ((EntityReference)incidentResolution.Attributes["incidentid"]).Id;
DateTime actualEnd = DateTime.Now;
if (incidentResolution.Contains("actualend"))
{
actualEnd = (DateTime)incidentResolution.Attributes["actualend"];
}
// Obtain the organization service reference.
IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

// Get created on of incident

Entity retrievedIncident = service.Retrieve("incident", relatedIncidentGuid, new ColumnSet(true));
DateTime createdOn = (DateTime)retrievedIncident.Attributes["createdon"];

TimeSpan totalTimeSpent = actualEnd.Subtract(createdOn);

Entity incident = new Entity("incident");
incident.Id = relatedIncidentGuid;
incident.Attributes["new_duration"] = totalTimeSpent.TotalMinutes;
service.Update(incident);

}
}

The helpful post

http://varghesedanny.com/2011/02/24/plug-in-when-case-incident-is-closed/

 

 

 

 

 

 

 

Cleared MB2-707 Microsoft Dynamics CRM Customization and Configuration CRM 2015 Exam


Took my first CRM 2015 exam this Monday and somehow managed to clear it.

There were total 49 questions with passing marks of 700 in 2 hours’ time.

Refer to the below helpful post for the training material

http://www.nzcrmguy.com/microsoft-dynamics-crm-2015-exams-elearning-courseware/

Fixed – CRM Mail Merge button missing in Word 2013.


Hi,

The way we got it working was to download the following template

CRMTemplate.dotm

From the following location

http://server:port/_static/Tools/MailMerge/CRMTemplate.dotm

And place it at the following location

C:\Users\[username]\AppData\Roaming\Microsoft\Templates

Followed by restarting Word.

The helpful post

http://www.experts-exchange.com/Software/Microsoft_Applications/Microsoft_Dynamics/Q_27749742.html

Nested Quick Create form in CRM 2015


Nested Quick Create form in CRM 2015

In CRM 2013,

If we click on Create button for Quick Create a record

Say for e.g. Contact record

And want to create a new Account record to be associated to it

We need to click on “Look Up More Records” and then “New”

This opens up the default Contact form

 

However in CRM 2015,

We have a New Button

It will open the Quick Create Form for the account record instead of the default form as in the case of CRM 2013.

On creating and saving the account record, it will close the Account record and populate the lookup in Contact record

Hiding Navigation Tour in CRM 2015


Navigation Tour dialog box opens up when user sign in to CRM.

If we want to disable this,

Go to Administration à System Setting à General Tab