ClickDimensions – adding a preview of the email that was sent in the Email sent record

So my problem I open up my contact to view the emails that have been sent via ClickDimensions, when I open the email I see the subject of the email that was sent but not the content. To get to the content I have to click the link to the email send record. This can be frustrating to users who what to get a quick view of the email content.

This started me thinking, if we can view a preview in the email send record then maybe we can construct the correct URL and display that in an iFrame in any related record. After a bit of playing and an email with Matt Wittemann from ClickDimensions I had a nice solution.

I thought I would share this and if I am honest as I am not a developer I would probably convert a couple of my steps into plugins rather than using workflows! Anyway this is how I achieved the solution.

First of all if we take a look at the URL in the preview of an Email send record, it looks something like this:

https://mscrmapp.clickdimensions.com/editor/previewversion?accountKey=xxxxx&typename=cdi_emailsend&orgname=xxxxx&id=A7167B49-B950-E511-8105-FC15B428FA14&disabled=true

Now the only thing that changes by email send is the email send GUID. So if I know the GUID of an email send record then I can display the email in any iFrame, simple!

Remember now that I am not a developer so my tools available to me are workflows, fields and web resources! This is how I did it:

  1. I utilised the GetRecordID workflow function provided by ClickDimensions in the blog (http://blog.clickdimensions.com/2013/02/link-a-survey-response-to-a-case.html)
  2. I created a new field on the Email Send record to hold the GUID of the record
  3. I created a workflow on the Email Send record that on create uses the GetRecordId action and populates the returned value in the new field (This could be a plugin instead of a workflow)
  4. Save and publish the workflow
  5. In the Sent Email entity
    1. Create a new field to hold the URL of the preview
    2. Create a new iFrame that will display the preview
    3. Create a simple Web resource to take the value of the URL field and update the iFrame URL as below:
    4. function Emailsend()
      {
      var emailsendurl = Xrm.Page.getAttribute(“new_emailsendurl”).getValue();
      Xrm.Page.ui.controls.get(“IFRAME_emailsend”).setSrc(emailsendurl);
      }
  6. What I did then was to use another workflow on the Sent Email to generate the URL into the Sent Email URL field, using the standard preview URL as above and populating the GUID from the related Email Send. This could equally of been done in a plugin on the create of an Sent email record.
  7. When I publish all of the components I now have the preview of the email that was sent displayed in my Sent Email record.

Dynamics CRM 2016 Release Preview Information

Dynamics CRM 2016 in the name of the next release for Dynamics CRM expected this Fall (December / January), and what a release it looks like it will be.

I have listed some resources that share some of the new features and content:

Microsoft Blog by Bob Stutz

Microsoft Dynamics CRM 2016 – Delivering the Next Generation of Intelligent Customer Engagement

YouTube Video on the new features

Youtube2016

Preview Guide

CRMPreviewGuide2016