Archive for March 27, 2018

Dynamics 365 – Configure ‘Relevance Search’

In Dynamics 365 online we have 2 types of Global Search

  • Category Search
  • Relevance Search

Rel Search_8

Category Search:

  • Its a multi-entity Quick Find Search, where you can pull the matching records from all configured entities in a single screen.

Relevance Search:

  • Relevance Search delivers fast and comprehensive results across multiple entities in a single list, sorted by relevance.
  • It uses a dedicated search service external to Dynamics 365 (powered by Azure) to boost Dynamics 365 search performance.

Lets see how to configure ‘Relevance Search’ in Dynamics instance and enable an entity.

Enable Relevance Search:

  • You have to enable Relevance Search first, Go to Settings -> Administration -> Check the ‘Enable Relevance Search’ checkbox

Rel Search_1

Set Entities Managed Property:

  • To enable entity for ‘Relevance Search’, make sure Managed property set to ‘True’. This property will be ‘True’ by default.

Rel Search_2

Add Entity to the list:

  • Open the ‘Default Solution’ -> Configure Relevance Search
  • Add the entity to the list

Rel Search_3

Set default global search:

  • You can choose the default search between ‘Categorized Search’ and ‘Relevance Search’ from your ‘Personal Settings’.
  • Last search option provides the last search experience you used in the current browser client. For example, if you used Relevance Search for your last search, the system will continue using this search until you manually switch to Categorized Search.

Rel Search_6


  • ‘Relevance Search’ is only available in Dynamics 365 online.
  • ‘Relevance Search’ is text-based, and can search only on fields of type Single Line of Text, Multiple Lines of Text, Option Sets, or Lookups. It doesn’t support searching in fields of Numeric or Date data type.
  • You can use syntax to search with combinations. For example, type car+silver+2-door to find only matches that include all three words. Type car|silver|2-door to get results that contain car or silver or 2-door, or all three words
  • There is no limit on no of entities can be included in the Relevance Search results. However, there is a limit on the total number of fields in the external search index. Currently, the maximum is 1000 searchable fields for an organization.


SSIS – Read C# ‘List’ collection in ‘Execute SQL Task’

In one of our integration requirements, we had to read the ‘List<>’ collection values, which was set in ‘Script Task’ control and pass to ‘Execute SQL Task’ control.

In this article I am going to list out the step by step process to set and get the ‘List<>’.

Assume that you have a collection List<string> which holds ‘Product Names’

var listProducts  = new List<string>() {“Product1″, ” Product2″, ” Product3″};

Lets see how to loop through and read the ‘Product names’ and pass to ‘Execute SQL Task’.

Required SSIS components:

  • A SSIS ‘Variable’ (i.e., varProducts) of type ‘Object’ to set the ‘List<>’ object in ‘Script Task’ control


  • A SSIS ‘Variable’ (i.e., varProductName) of type ‘String’ to set the ‘Product Name’ for each List<> value.


  • ‘Foreach Loop container’ to parse and read the ‘List<>’


  • Choose ‘varProducts’ as ‘ReadWriteVariables’


  • In ‘ScriptTask’ set ‘listProduct’ object to ‘varProducts’ variable.
    • var listProducts  = new List<string>() {“Product1″, ” Product2″, ” Product3″};
    • Dts.Variables[“User:: varProducts”].Value = listProducts ;
  • In ‘Foreach Loop container’,
    • Choose ‘Enumerator’ as ‘Foreach From Variable Enumerator’
    • Enumerator Variable as ‘User:varProducts’


  • As the ‘List’ contain ‘Product Name’ collection, read the ‘Product Name’ to ‘varProductName’ variable. ‘Index’ 0 denotes, first value in collection (i.e., Product Name’.


  • As the final step, In ‘Execute SQL Task’, map the ‘varProductName’ variable to a ‘Parameter’.


  • In above screen, we are setting ‘@prodName’ parameter with ‘Product Name’ and ‘@prodName’ further used in ‘SQL Statement’ of ‘Execute SQL Task.


Categories: SQL Tags: ,