Dynamics CRM Hub

Overview

The integration with Dynamics is done by importing the SmartHub solution into your Dynamics 365. The SmartHub solution for Dynamics exposes two types of integration:

  • Full search: In this integration, the SmartHub Search Center is displayed as a full page. This page is accessible from the navigation menu BA Insight > SmartHub.
  • Local search: In this integration, the SmartHub Search Center is displayed as part of a section on the page, with the ability to interact between SmartHub and Dynamics. This is accessible from the pages where the SmartHub Local Search component is added. For more information, see Add the SmartHub Local Search Integration.

Prerequisites

SmartHub must be installed and accessible using HTTPS

  • This requires a trusted, valid certificate to be configured in the IIS bindings

Limitations

Note the following limitations with the SmartHub Dynamics Hub:

  • The SmartHub Dynamics Hub is not supported on the Power Apps dedicated app for mobile and desktop.

  • Users must allow pop-ups for the SmartHub Dynamics Hub on browsers where third-party cookies are blocked.

Additional Features

Note the following additional features for the Dynamics CRM Hub integration:

  • If the Microsoft Dynamics Global Search box is enabled, you can use that search box in your integration rather than the SmartHub search box. See Use Global search in the options to configure table.

  • When users select the Open button for the SmartHub Dynamics CRM Hub through the Microsoft PowerApps Mobile app menu, it will be opened in a mobile browser. You can configure the redirect message and the redirect delay for your users when they open the SmartHub Dynamics CRM Hub in this way.

Import the SmartHub Solution

To import the SmartHub Dynamics App, do the following:

  1. Navigate to the /integrations/dynamics/SmartHubApp folder in your SmartHub installation directory, and create a .zip archive with all the contents of the folder.
  2. In a browser, navigate to https://make.powerapps.com/.
  3. From the Power Apps homepage, click Solutions.
  4. On the Solutions page, click Import solution.
  5. On the Import a solution panel, click Browse and select the .zip file you created in step 1.
  6. Click Next > Import.
  7. On the Solutions page, you will now be able to locate the BAInsight.Dynamics.SmartHubCrm solution.

Configure the SmartHub Solution

  1. In Power Apps, click Solutions.
  2. From the Solutions page, click the BAInsight.Dynamics.SmartHubCrm solution that you created in How to Import the SmartHub Solution.
  3. From the BAInsight.Dynamics.SmartHubCrm solution, click SmartHub Configuration Page.
  4. On the Edit Web Resource panel, click the URL. The configuration page opens in a new browser window.
  5. Complete the fields, refer to the options to configure table for more information.

Options to Configure

Property Name Usage Sample values
Local search URL

This is the SmartHub HTTPS address of the page that is opened by the Local Search component. This must be accessible from the machine where you are accessing Dynamics 365 from. If this page is hosted internally on your intranet, users must be connected to your intranet to access the page. 

You can use the following parameters to control page behavior:

  • ribbon=false: Hides the ribbon from the SmartHub page.
https://smarthub.contoso.com/integrations/dynamics /DynamicsResults.html?ribbon=false
Full search URL

This specifies the SmartHub HTTPS address of the page that is opened by the Full Search page. This must be accessible from the machine where you are accessing Dynamics 365 from. If this page is hosted internally on your intranet, users must be connected to your intranet to access the page.

https://smarthub.contoso.com/Index.html
Redirect message This specifies the message that is shown to the user when they are accessing the SmartHub Dynamics Hub through the Microsoft Power Apps mobile application. "Enterprise Search will open in a separate browser window in a few moments. You can manually open it by clicking the 'Return' button"
Redirect delay in seconds This specifies the delay, in seconds, before the browser is opened automatically when the user accesses the SmartHub Dynamics Hub through the Microsoft PowerApps mobile application. 2
Use Global SearchBox When this setting is enabled, your SmartHub integration will include the Microsoft Power Platform global search box for your SmartHub app in your Dynamics environment. If you are using the global search box, you must disable the SmartHub search box. For more information, see Configure Dataverse search for your environment. unchecked
Entities to search

This specifies a comma separated list of [object].[field] that are passed as search to SmartHub when navigating to a page that loads that record. SmartHub Local Search automatically runs a search with the value of the configured properly for the page you are viewing. 

For example, if you are on the Accounts page, and you configured this property to be account.name, the Local search component passes the current account's name to be searched when the page is loaded.

You can configure as many properties as you want in the format:

  •  object1.field1,object2.field2.

You cannot configure multiple fields form the same object:

  • object1.field1,object1.field2

To find the required object and field go to:

  • Settings > Customizations > Customize the System > Open the Entities drop down > Open the required object drop down > Click the fields button.

account.name,contact.firstname

See All Configurable Entities

  1. In Power Apps, click Tables.
  2. From the Tables page, Select a table in your environment.
  3. From the specific table page, click Forms in the Data Experiences container.
  4. From the Forms page, select a form.
  5. From the top menu bar, click Component.
  6. On the left side menu, under Components, expand the Entities.
  7. Expand the desired entity, click on Fields to see all properties for an entity.

Add the SmartHub full search integration

To use the SmartHub full search integration in your environment, do the following:

  1. In Power Apps, create a new model-driven app.
  2. In the New model-driven app window, provide a Name and Description for your app.
  3. Click Advanced, then select Use components from a custom solution.
  4. In the Solution field, select BAInsight.Dynamics.SmartHubCrm from the drop-down list.
  5. In the Site map field, select Site Map from the drop-down list.
  6. Click Create.
  7. When your app has been created, The app page displays. In the top right corner, click Save and publish, then Run.
  8. Your full search integration will open in a new tab on the Settings page. In the bottom left, click Settings > BA-Insight.

Add the SmartHub Local Search Integration

To use the SmartHub local search integration in your environment, do the following:

  1. In Power Apps, click Tables.
  2. From the Tables page, Select a table in your environment.
  3. From the specific table page, click Forms in the Data Experiences container.
  4. From the Forms page, select a form.
  5. Ensure the form container is selected, then click Form Libraries from the top menu bar.
  6. In the left panel, click Add library.
  7. In the Add JavaScript Library window, search for SmartHub Frame JavaScript. select the entry where the Name is shcrm_frame.js.
  8. In the right panel, click Events.
  9. For the On Load event, click + Event Handler.
  10. In the Configure Event window, in the Library field, select shcrm_frame.js.
  11. In the Function field, enter SmartHubCrm.loadEntity.
  12. Turn on the Enabled and Pass execution context as first parameters checkboxes.
  13. From the top menu bar, click Component.
  14. In the left panel, click Display > HTML web resource.
  15. In the Add HTML web resource window, search for "Search Frame Page". select the entry where the Name is shcrm_frame.js.
  16. Select the entry, then click Add.
  17. At the top menu, click on the Form button to edit the form.
  18. Your local search integration now appears as a component on the specified form page.

How to Remove the SmartHub Solution

  1. Remove the Local Search component (both web resource HTML and JavaScript form library) from all pages where you've added it.
  2. In Power Apps, click Solutions.
  3. Select the SmartHub solution and delete it.

How to Update the SmartHub Solution

  1. In Power Apps, click Solutions.
  2. Click on Import and select the new zip archive with the solution to upload.