Advertisements

Archive

Archive for the ‘ADX’ Category

Liquid script to fetch Contact names – Dynamics Portals SaaS

December 26, 2017 Leave a comment

In Dynamics portals (SaaS) to make CRM server calls to retrieve the data we must rely on Liquid Script.

In this article, I am going to retrieve Contacts and loop through to capture Contact ‘Full Name‘ using Liquid Script and display on a Web Template.

Liquid Script - 1

Liquid script to fetch Contacts:

{% fetchxml settings %}
<fetch version=”1.0″ output-format=”xml-platform” mapping=”logical” distinct=”false”>
<entity name=”contact”>
<attribute name=”fullname” />
<attribute name=”telephone1″ />
<order attribute=”fullname” descending=”false” />
</entity>
</fetch>
{% endfetchxml %}
{% assign result = settings.results.entities %}
{% for item in result %}
{% assign Names = {{item.fullname}} | append: ‘ , ‘ | append: {{Names}} %}
{% endfor %}

// Set the Concatenated text to Span so that it can be read in JScript

<span id=”spanContactNames” style=”display:block”>{{Names}}</span>

Complete Web Template Source:

<html lang=”en” xmlns=”http://www.w3.org/1999/xhtml”&gt;
<head>
<meta charset=”utf-8″ />

function onload() {

// Read Contact names from Span
var spanContactNames = document.getElementById(“spanContactNames”);
if (spanContactNames) {
alert(spanContactNames.innerText);
}
}

</head>
<body onload=”onload()”>
<h1>**Contact Names**</h1>
{% fetchxml settings %}
<fetch version=”1.0″ output-format=”xml-platform” mapping=”logical” distinct=”false”>
<entity name=”contact”>
<attribute name=”fullname” />
<attribute name=”telephone1″ />
<order attribute=”fullname” descending=”false” />
</entity>
</fetch>
{% endfetchxml %}
{% assign result = settings.results.entities %}
{% for item in result %}
{% assign Names = {{item.fullname}} | append: ‘ , ‘ | append: {{Names}} %}
{% endfor %}
<span id=”spanContactNames” style=”display:block”>{{Names}}</span>
</body>
</html>

Note :

  • ‘Liquid Script’ gets executed during the Web Page render and hence the fetched values will be available on Page ‘onload’ script event.
  • ‘Liquid Script’ will respect the Portal security model (i.e., It fetches the records only if you have access granted by your Web Role)

How to test:

  • Create a new Web Template and paste the content to “Source” field.

Liquid Script - 2

  • Add a Web Link and map your Web Template.

🙂

Advertisements
Categories: ADX Tags: ,

Dynamics Portals – How to get the configured Portal’s URL

December 19, 2017 1 comment

There was a question posted in my blog on how to get the configured Portal’s URL as someone else configured the portal.

Below are the steps to get your Portal URL.

From your Dynamics 365 Instance:

  • Connect to your Dynamics 365 instance
  • Navigate to Portals -> Website Bindings
  • Open the record and read the URL from “Site Name” field

Portal - URL 3

From your Dynamics 365 Admin Center:

  • Connect to your “Dynamics 365 Admin Center” (i.e., Login to Portal.office.com)
  • Select your “Dynamics 365” instance
  • Click on “Applications” tab
  • Select “Portal Add-on” and click “MANAGE” button

Portal - URL 1

  • You would be redirected to “Portal” configuration page
  • Copy the URL

Portal - URL 2

Note:  You can access your Portal configurations page, only if your Admin granted access to your login Account. If you don’t have permission, you would end up getting below error message:

You don’t have permission to perform this action. Contact your global administrator to get owner permission for Application ID

🙂

Categories: ADX, CRM Tags: , ,

Configure CafeX Live Assist on Dynamics Portals

December 15, 2017 Leave a comment

In this article, I am going to detail the steps to configure ‘Live Assist’ on ‘Dynamics Portals’.

Those who are not familiar with CafeX Live Assist, Live Assist for Microsoft Dynamics 365 Powered by CaféX is a fully integrated omnichannel (i.e., across mobile and web) solution. It provides Chat, Co-browse features.

Note: As we are going to configure ‘Live Assist’ on Dynamics Portals, make sure you have enabled Dynamics 365 portal solution on your Dynamics 365 instance.

To start with, enable the ‘Live Assist’ solution on your Dynamics 365 online instance.

Enable ‘Live Assist’ solution in Dynamics 365 instance:

You can start your ‘Live Assist’ free trail from ‘App Source’

Live Assist - Set up

  • Complete the suggested steps which installs the ‘Live Assist’ solution in your Dynamics 365 Instance.
  • Once you followed the steps, give it few minutes and you should see ‘Live Assist for Dynamics 365’ solution with ‘Installed’ status.

Live Assist - Set up 2

  • Open your Dynamics 365 instance and you should see the ‘CafeX’ tool bar.

Live Assist - CRM

Enable ‘Live Assist’ on Dynamics Portal:

In ‘Live Assist’ scenario, your Dynamics Portal acts as Visitor site and Dynamics 365 works as receiver (i.e., Agent) site, which means, Portal users initiate the chat which will be addressed by CRM User.

Below are the 2 steps to configure Chat window on your Dynamics Portals which allows your Portals User to initiate the chat.

  1. Copy the chat widget script from CafeX site:
  • Check your email inbox for Cafex confirmation mail with CafeX website URL.

Live Assist - Set up email

  • Navigate to the URL and click on ‘GET STARTED’ tab
  • Click ‘COPY’ button to copy the chat widget script.

Live Assist Prtl - 22. Configure Portal Web Template:

  • Go to Dynamics 365 and open the ‘Header’ web template.
  • Paste the widget script you copied in earlier steps.

Live Assist - Header Template

  • Save the Web Template.

We are done with configurations and it’s time to test the Chat.

‘Live Assist’ Usage steps:

  • Open the Dynamics Portal URL and you should see a “Live Chat” button floating.

Live Assist Portal - 1

  • Click the button and start the Chat.

Live Assist Portal - 2

  • Message from Portal will be instantly delivered to CRM Agent.
    • Note: CRM Agent ‘Live Assist’ Status must be ‘Available

Live Assist - 1

🙂

Categories: ADX, CRM Tags: , ,

Azure Web Deploy – Time out errors

September 10, 2017 Leave a comment

Recently when we were trying to publish a web site to Azure ‘Deployment Slot’ using Visual Studio “Web Deploy” option, we encountered either Time out exception or VS hung after few files push.

Azure - Web Deploy - Visual Studio

Reason for this exception could be due to the enormous transactions on main (Prod) web app of the ‘Deployment Slot’.

Work around:

  • We found a work around by using Drag and Drop feature of Kudu service deploying to wwwroot folder directly.

Steps:

  • Publish the web site to your machines local drive

Publish Website - Local drive

  • ZIP the files (***You must select all the files and Zip it; Don’t zip the folder)

Publish Website - Zip folder

  • Open the Deployment Slot’s Kudu Service (Go to ‘Advanced Tools’ -> Go)

Web App - Advanced Tools

  • On the Kudu page, navigate to Home -> site -> wwwroot
  • Drag and drop the zipped folder of your published web site.

Kudu wwwroot - Drag and Drop

  • Wait for the process to complete publish.

🙂

Categories: ADX Tags: , , ,

Dynamics 365 Portal – Troubleshoot errors hosted in Azure

September 3, 2017 Leave a comment

Recently we got internal server error while we were accessing Portal hosted in Azure.

Microsoft Azure is providing simple and quick way to troubleshoot the errors.

There are few options to troubleshoot like ‘Log Stream’ and ‘Diagnostic Dumps’. In this Article, I am going to show how to use them.

Pre-requisite:

  • Connect to your Azure account and open the Web App from ‘App Services’
  • Make sure you enable “Application Logging” from ‘Diagnostics logs’ section

Azure - Diagnostics logs

Log Stream:

  • ‘Log Stream’ is helpful to track the ongoing exceptions and track the live Request and Response.

Azure - Log Stream

Diagnostic Dump:

  • Connect to KUDU services by clicking on ‘Advanced Tools –> Go’

Azure - Connect to KUDU Service

  • Click on Tools –> Diagnostic Dump

Azure KUDU - Diagnostic Dump

  • Download and extract the .zip folder
  • Go to ‘LogFiles’

Diagnostic Dump - Eventlog

  • Open the ‘eventlog.xml’ using any file editor

Diagnostic Dump - Open Eventlog

‘Application Insights’ is another option which helps you detect and diagnose quality issues in your web apps and web services.

🙂

ADX Portals Web Notification system job failures and fix

Other day ADX web notification system jobs were failing/in Progress from long with below error message

ADX Web Notifctaion Failures

To give little background on Web Notifications:

  • Adxstudio Portal application caches results from CRM to improve performance.
  • This is done by adding a Web Notification URL in CRM (Advanced Find –> Web Notification URLS)

Web Notifctaion URL's

  • For each event that is processed in the CRM event execution pipeline, such as a create, update, or delete, a new system job for the appropriately registered Web Notification plugin step is created and run that sends an HTTP POST web request to each Web Notification URL to inform the portal cache should be refreshed

Reason and Fix:

  • Issue was with wrong web notification URL.
  • We modified our portal URL hosted in Azure and did not update the same in “Web Notification” URL.
  • Issue has been fixed by correcting the URL and disable and then enable the web notifications again
    • To Enable\Disable Notifications, open OOB ADX “Web Notification’ solution (Settings -> Solutions)

Enable_Disable Web Notifications

Note:

  • If web notifications have been enabled and a change is made to the Portal URL and/or Web Notification URLs, the web notifications need to be disabled and then enabled again to have the changes to the URLs properly registered.
  • If multiple Portal Web App’s hosted for a CRM organization, you can have multiple “Web Notification URL” entries.

Refer article for more info on Web Notifications.

🙂

Categories: ADX Tags: ,