Monday, August 21, 2017

Common queries regarding Dynamics CRM Asynchronous Service in Dynamics CRM 2011, 2013, 2015, 2016, D365

here is a nice link and very details on Asynch Service on CRM


Thursday, January 12, 2017

Relevance Search in Dynamics 365 Online

this is a very unique and great feature, but only available in online. doubt when it will be available for on prem. this is also available in mobile clients.

Relevance Search delivers fast and comprehensive search results in a single list, sorted by relevance. It uses a dedicated search service external to Microsoft Dynamics 365 (online) powered by Microsoft Azure Search to improve your Microsoft Dynamics 365 (online) search experience. As an administrator or customizer, you'll be able to enable and configure Relevance Search in the Dynamics 365 user interface without writing code. Many of the configuration steps will look familiar to you, as they use the same user interface as the Quick Find configuration.

Compare Dynamics 365 searches

There are three kinds of search in Dynamics 365:

The following table provides a brief comparison of the three available searches.
FunctionalityRelevance SearchFull-Text Quick FindQuick Find
AvailabilityAvailable for Microsoft Dynamics 365 (online) organizations that have installed Microsoft Dynamics CRM Online 2016 Update. Not available for Dynamics 365 (on-premises) organizations. Available for Dynamics 365 (on-premises) organizations, starting with Microsoft Dynamics CRM 2015 Update Rollup 1. Available for Microsoft Dynamics 365 (online) organizations and Dynamics 365 (on-premises) organizations.
Enabled by default? No. An administrator must manually enable it. No. An administrator must manually enable it.Yes
Single-entity search scopeNot available in an entity grid. You can filter the search results by an entity on the results page.Available in an entity grid. Available in an entity grid.
Multi-entity search scopeThere is no maximum limit on the number of entities you can search.Searches up to 10 entities, grouped by an entity. Searches up to 10 entities, grouped by an entity.
Search behaviorFinds matches to any word in the search term in any field in the entity.Finds matches to all words in the search term in one field in an entity; however, the words can be matched in any order in the field.Finds matches as in a SQL query with “Like” clauses. You have to use the wildcard characters in the search term to search within a string. All matches must be an exact match to the search term.
Search resultsReturns the search results in order of their relevance, in a single list.For single-entity, returns the search results in an entity grid. For multi-entity, returns the search results grouped by categories, such as accounts, contacts, or leads.For single-entity, returns the search results in an entity grid. For multi-entity, returns the search results grouped by categories, such as accounts, contacts, or leads.

How Relevance Search works

Relevance Search uses the same default scoring concepts as Azure Search. Scoring refers to the computation of a search score for every item returned in search results. The score is an indicator of an item's relevance in the context of the current search operation. The higher the score, the more relevant the item. In search results, items are ranked in order from high to low, based on the search scores calculated for each item. By default, a search score is computed based on statistical properties of the data and the query. Relevance Search finds documents that include the search terms in the query string, favoring the documents that contain many instances of the words in the search term and their close proximity to each other in the document. The search score goes up even higher if the term is rare across the index, but common within the document. The results are then ranked by search score before they’re returned. Search score values can be repeated throughout a result set. For example, you might have 10 items with a score of 1.2, 20 items with a score of 1.0, and 20 items with a score of 0.5. When multiple hits have the same search score, the ordering of same-score items isn’t defined, and isn’t stable. Run the query again and you might see items shift position. Given two items with an identical score, there is no guarantee which one appears first.

Searchable fields are analyzed in the Azure Search index to provide a more natural, end-user friendly search experience by breaking words into their root forms, text normalization, and filtering out noise words. All searchable fields in Relevance Search are analyzed with the Microsoft Natural language analyzer, which uses Lemmetization to break words down into their root linguistic forms. For example, “ran” will match to “run” and “running” since “run” is considered the base form of the word. Word stemmers, such as SQL full-text indexes, don’t have any linguistic context and only consider matches where the root is the same as the inflectional form. With stemming, “run” would match to “running” and “runner”, but not “ran” since it doesn’t consider “ran” to be a word linguistically related to “run”. All searchable fields in Relevance Search use an analyzer that most closely matches the organization’s base language. For Kazakh, which is the only language supported by Dynamics 365 but not by Azure Search, all fields are analyzed using the default analyzer.

Enable Relevance Search

By default, Relevance Search is disabled. To enable Relevance Search, do the following:

  1. Go to Settings > Administration.
  2. Click System Settings > General tab.
  3. In the Set up Search sub-area, select the Enable Relevance Search check box, as shown here. Do not click Select here.

4.After you enable Relevance Search, the Enable Search consent dialog box opens. Click OK to give your consent. 

Select entities for Relevance Search

There is no limit on how many entities you can include in the Relevance Search results. However, there is a limit on the total number of fields you index. Currently, the maximum is 1000 searchable fields for an organization. When you select an entity to include in the search results, you’ll notice a number in parentheses next to the entity name. The number indicates how many fields of the entity will be synced to the external search index. Some fields, such as Primary Name and ID, are shared by multiple entities and don't count toward the total. The progress bar Total fields indexed shows the percentage of indexed fields to the maximum allowed number of searchable fields.
When you have reached the indexed field limit, you’ll see a warning message. If you want to add more fields to the index, you’ll have to free up space, either by removing some of the fields that are already in the index or removing entire entities from Relevance Search.
To select entities for the Relevance Search results, do the following:

  1. Go to Settings > Customizations.
  2. Click Customize the System.
  3. Under Components, expand Entities, and then click Configure Relevance Search.
  1. Click Publish All Customizations for your changes to take effect.

The fields you add in Quick Find view become part of the external search index. There is no limit on how many searchable fields you can add for each entity. However, there is a limit on the total number of indexed fields, as was explained in the previous section. Find Columns on a Quick Find View define the searchable fields in the external search index. The View Columns on a Quick Find View define the fields that are displayed in the user interface by default, when the matched results are returned. The fields that are highlighted replace the fields that don’t have the highlighting. The first four matched fields are displayed in the results.
You can use the Quick Find view to define which fields appear as facets when users search by using Relevance Search. All View Columns with data types other than Single Line of Text and Multiple Lines of Text are marked as facetable and filterable in the index. By default, the first four facetable fields in the Quick Find view for the selected entity are displayed as facets when users search by using Relevance Search. At any time, you can only have four fields selected as facets.

  1.  Click Add Find Columns. In the dialog box, select the fields you want to add to the search index. When done, click OK. In the following illustration, you see the Account entity fields added to the external search index. 

If you want to include an entity in Relevance Search, the Can enable sync to external search index managed property for this entity must be set to True. By default, the property is set to True for some of the out-of-the-box system entities and all custom entities. Some of the system entities can’t be enabled for Relevance Search.
To set the managed property, do the following:

  1. Go to Settings > Customizations.
  2. Click Customize the System.
  3. Under Components, expand Entities, and then click the entity you want.
  4. On the menu bar, click Managed Properties. For Can enable sync to external search index, click True or False to set the property to the desired state. Click Set to exit, as shown here

        Click Publish for your changes to take effect.
    If you want to change the Can enable sync to external search index property to False, you must first deselect the entity from Relevance search. If the entity is included in Relevance Search, you’ll see the following message: “This entity is currently syncing to an external search index. You must remove the entity from the external search index before you can set the Can Enable Sync to External Search Index property to False.” If Can Enable Sync to External Search Index is set to False, you’ll see the following message when you try to include an entity in Relevance Search: “Entity can’t be enabled for Relevance Search because of the configuration of its managed properties.” For custom entities with particularly sensitive data, you may consider setting the Can enable sync to external search index property to False. Keep in mind, after you install the managed solution on the target system, you won’t be able to change the value of the property because it’s a managed property.

    Privacy notice

    By enabling Relevance Search, data in participating entities and attributes in your Dynamics 365 (online) instance will begin syncing to and be stored in an Azure Search index.
    Relevance Search is not enabled by default. The system administrator must enable the functionality within a Dynamics 365 (online) instance. After Relevance Search is enabled, system administrators and customizers have full control over the data that will be synchronized to the Azure Search index.
    System customizers can use the Configure Relevance Search dialog box in Customization Tools to enable specific entities for search and then configure Quick Find views on enabled entities to select the searchable attributes. Data changes are synchronized continuously between Dynamics 365 (online) and Azure Search through a secure connection. Configuration data is encrypted and the required secrets are stored in Azure Key Vault.
    Azure components and services that are involved with Relevance Search functionality are detailed in the following sections. 

Tuesday, December 27, 2016

Duplicate detection rules in Dynamics CRM 2015, 2016, Dynamics 365

to share, when I was working with dynamics crm duplicate detection rules, below my observations w.r.t auto save.

Auto save does not work on create. its simple why, cause this does take care of the mandatory fields enter or not etc.

when u have already a record present and now you are creating a new with same values as per your duplicate rule, when you save, the rule will run and  you will be prompted with the duplicate records and an option if you want to save this also or not.

when you have opened and updating a record, if you are editing and updating to same set of values as per duplicate rule, if you immediately same by your own, then will be prompted with duplicate records and an option as above scenario.

else if the auto save triggered before you hit save button, then there will be a balloon message as below screen and one you click "Resolve Duplicate", it will prompt the above scenario screen with all duplicate records and options, else if you click "Save Anyway", it will just create another duplicate record.

Saturday, November 19, 2016

workflow must be in published state error message while saving Case record in Dynamics CRM 2016 online

while working on dynamics crm 2016 online I got below error while saving case record.
"workflow must be in published state". once download the message I got below

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Workflow must be in Published state.Detail:
<OrganizationServiceFault xmlns:i="" xmlns="">
  <ErrorDetails xmlns:d2p1="">
      <d2p1:value xmlns:d4p1="" i:type="d4p1:string">Workflow must be in Published state.</d2p1:value>
      <d2p1:value xmlns:d4p1="" i:type="d4p1:string">workflowId</d2p1:value>
  <Message>Workflow must be in Published state.</Message>
  <ExceptionSource i:nil="true" />
  <InnerFault i:nil="true" />
  <OriginalException i:nil="true" />
[Microsoft.Crm.Service.ObjectModel: Microsoft.Crm.Service.ObjectModel.CasePostCreatePlugin]
[ffde44b1-a685-4948-85b8-e4091bc2a98b: CasePostCreatePlugin]
                [Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]
                [46f6cf4c-14ae-4f1e-98a1-eae99a37e95c: ExecuteWorkflowWithInputArguments]
strange, I activated all workflows, business process, still same issue.
then I deleted all (taken back up) 1st, still same issue.
then I just though to see anything related to case, I landed to SLA.
I just deactivated, then I was able to save Case record.
even then I activated SLA, also I was able to save.

SO JUST deactivate and activate again is the solution. but do not know why?