This is the documentation for Clover Club 12.0.
Documentation for the upcoming version Rampur 13.0 can be found here.

Configure MS Dynamics Dashboard

To integrate Unity to MS Dynamics Dashboard in default solution, follow these steps:

  1. Go to Settings > Customization and click Customize the System.

  2. In the tree, go to Components > Web Resources.

  3. Click New in the top menu bar.

  4. Enter Name, Display Name and select Webpage (HTML) Type for this web resource.

  5. Click Text Editor to add the following script, locate the <iframe> tag and update the 'src' attribute to follow this format:
    https://<customer cluster domain name>/pricefx/<partition name>/saml/consume?RelayState=<Relay State Name>

    Dashboard Script

    <html><head><script type="text/javascript"> var PFXDashboardLookup = function (event) { var jsonData = JSON.parse(event.data); var action = jsonData.action; var data = jsonData.data; switch (action) { case 'getPayload': console.log("..DYNAMICS.eventHandler getEntityInfo", action); var response = {}; response.action = action; response.entityName = 'dashboard'; event.source.postMessage(JSON.stringify(response), event.origin); break; case 'getEntityInfo': console.log("..DYNAMICS.eventHandler getEntityInfo", action); var response = {}; response.entityName = 'dashboard'; event.source.postMessage(JSON.stringify(response), event.origin); break; case 'findOpportunities': console.log("..DYNAMICS.eventHandler findOpportunities", action); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4 && xmlhttp.status == 200){ var opportunities = []; var response = JSON.parse(xmlhttp.responseText); for (var i = 0; i < response.value.length; ++i) { var opportunity = response.value[i]; opportunities.push( { Id: '{' + opportunity.opportunityid + '}', Name: opportunity.name } ); } event.source.postMessage(JSON.stringify({ id: '1', data: opportunities }), event.origin); } } xmlhttp.open("GET", '/api/data/V8.0/opportunities/?$select=name&$top=10&$filter=contains(name,\'' + data.searchText + '\')', true); xmlhttp.send(); break; } return; } document.onreadystatechange = function () { if (document.readyState == "complete") { if (window.XMLHttpRequest) { parent.addEventListener("message", PFXDashboardLookup, false); } else { parent.attachEvent('onmessage', PFXDashboardLookup); } window.parent.document.getElementById('WebResource_Componente65d6bb').style.height = '3000px'; } } </script> <iframe src="https://<customer cluster domain name>/pricefx/<partition name>/saml/consume?RelayState=<Relay State Name>" style="width:100%; height:2000px;overflow:auto;"> </iframe></body></html>
  6. Click OK, save and publish this web resource.

  7. Go back to Solution Customization and select Components > Dashboards.

  8. Click New in the top menu bar and select Dashboard to create a new dashboard.

  9. Click Create to add a new empty dashboard.

  10. Enter the name and click the Web Resource button in the top menu bar.

  11. Select the above web resource and fill in the required Name and Label.

  12. Click OK and save your change.

  13. Finally, you can check your work by switching back to Sales > Dashboards and selecting the created dashboard.