Sonoma Partners Microsoft CRM and Salesforce Blog

Plotting CRM Audit Data

Today's blog post was written by Angel Shishkov, Principal Developer at Sonoma Partners.

CRM field audit data is notoriously hard to retrieve. It is not available through Advanced Find and is not exportable through the Audit view on the CRM record. Going the custom route, it is possible to retrieve audit records through FetchXML queries, but getting to the concrete values that changed becomes harder. The recommended and supported way of getting to the field audit logs then is to use the RetrieveAttributeChangeHistoryRequest message.

I will demonstrate how to use the RetrieveAttributeChangeHistoryRequest message in CRM by setting up a simple feature that requires us to read the Audit logs.


We have a custom currency field on the Account entity called new_revenue. We have an integration or some other process that updates this field periodically with the total revenue on this Account. We would like to plot the value of revenue on the Account over time, so we can visualize the trend.


We will make use of CRM’s native field auditing to track the historical values of the revenue field on Account. We need to enable auditing on the CRM org, on the Account entity, and on the custom new_revenue field. We will use a custom console application to retrieve the field audit data for new_revenue through the RetrieveAttributeChangeHistoryRequest request of the CRM SDK. The data retrieved will be dumped into a CSV file, which can be opened in Excel and the data can be analyzed and plotted on a graph.


The relevant C# code for the console app is below.

This is what it does:

  • Creates a RetrieveAttributeChangeHistoryRequest and sets the Account record as the Target and the new_revenue field as the AttributeLogicalName. This request will return all the audit history for this field.
  • Executes the request against the CRM OrgService and receives the response.
  • Opens a stream to write to a file called output.csv. This file will contain the audit history output in a comma-separated format that is readable by Excel.
  • The response returns a collection of AttributeAuditDetails, each of which represent a single change in the value of the new_revenue field.
  • We loop through all AttributeAuditDetails, and for each one we extract the following:
    • createdon: This is the date and time of the change. We retrieve it from FormattedValues, so that we get the date and time converted in our local time zone, instead of UTC.
    • new_revenue old value: This is the current value of new_revenue at the time the change occurred.
    • new_revenue new value: This is the new value that was assigned to new_revenue.
  • We format these values into a comma-separated line, and write the line to the CSV file.

When we run this code, it produces a file with contents that look like this:

We can open this file in Excel and see the three columns of data we extracted, the date and time of the change, the old value, and the new value of revenue. Now that it is in Excel, we can set up a simple chart to visualize the data. Select columns A and C (the date and the new value), open the Insert tab in Excel, and select a chart, for example a 2D Line. Excel automatically sorts out the axes, plotting the revenue dollar value on the vertical and the date and time values on the horizontal.

Here is what it looks like:

Angel image 1


Mining your audit data has lots of uses, and this is just one of them. If you are looking to expand on this, or build something more complex and you need some help, give us a call. Thanks for reading!

Ease into the cloud with Microsoft Dynamics Lifecycle Services

Topics: Microsoft Dynamics 365

Shifting to a PowerBI World

Today's blog post was written by Keith Mescha, a Principal Architect at Sonoma Partners.

Power B-What?

There's been a bit of buzz recently in the CRM circles around Power BI and how it fits into the overall CRM landscape. There is certainly no shortage of blogs, podcasts and event demos showcasing the power of this toolset. On a personal note, I'm am seeing the same level of interest based on the meetings on my calendar over the past few weeks.

What we're finding at Sonoma is that the topic of Power BI is still very confusing for most customers. In this multi-part series we hope to help demystify some of the confusion through real-life examples and suggest some best practices based on learnings from our internal use as well as implementations with our clients.

The Basics

Power BI is Microsoft's analytics and dashboard Business Intelligence (BI) suite of tools and solutions. It's made up of a few main offerings:

  • Power BI Desktop – Free development tool for building data models and dashboards
  • Power BI Service – Online PaaS offering to host and share Power BI solutions with a monthly licensing per user subscription based model
  • Power BI Embedded – Online PaaS offering for embedding Power BI solutions into applications for external consumption with a session based subscription model
  • Power BI Mobile – Free mobile app for consumption of deployed Power BI solutions on a mobile device
  • Power BI Enterprise Gateway – On Premise software used to extend on premise data to the Power BI Service

For latest and greatest features and release notes, refer to the Power BI site.

Real-Life Example

Every company I know has data quality issues or challenges to overcome. Unfortunately, we here at Sonoma are not exempt. One of the things we constantly struggle with is incomplete data and stale data. Often times, we will create a record without knowing all of the various data points we typically want to capture. If we do not go back and fill that information in once it becomes known, we are left with an incomplete and potentially inaccurate record. The genesis of the original report request was to provide a means for the data steward team to monitor newly created records.

The original ask was for a custom SSRS report that listed out all Accounts that were missing specific data across a pre-determined list of fields. This report would then be provided to our data steward team on a regular basis to ensure the data is augmented appropriately. When one of my colleagues stopped by to chat about the report, I happened to be in the middle of building a dashboard in Power BI for a customer. He was curious what I was working on, and as we talked and he explained his need, I fired up a new instance of Power BI desktop in an attempt to solve the problem.


Get Your Data

I pulled up the 'Filtered Account' view from the 'Get Data' option in Power BI. My User Account is a System Admin and the Filtered Account view resolves all the option set and lookup fields for us, so this was a quick and easy solution. When getting data for many of the source types, you have an option to Import or Direct connect. I’ll go deeper on that topic in my next post but for this solution I chose to import.


Shape Your Data

Initially Power BI pulls in all the attributes in the table, this can be a bit overwhelming so filtering down the attributes was our next step. My colleague had a list off the fields he wanted to audit and report, so I filtered down the data set to only include those attributes.


Within 15 minutes my colleague and I had a prototype dashboard built with the fields he needed, including a couple charts to use as filters. From there we iterated on a few designs, and ultimately landed on the below look and feel. End to end this entire process took a couple hours to build, including some custom columns to allow linking to our Account Forms on Dynamics and Salesforce.


Deploy Your Solution

Once we had a solid solution built in Power BI Desktop, I created a new O365 group for internal reporting, added a few users to the group and then deployed the Power BI solution to the Power BI service.

One key thing to note here is that we had to assign Power BI licenses to these users before they could login and see our dashboard. The fact that we wanted to schedule this a couple times per day and that we were managing this through our 0365 AD bumped us from the free to the paid license. We had a handful of users requiring access and plenty of licenses available so this was a decent option for us. If you have a different need there are other options, we can consider for staying on the free option.


Manage Your Solution

From there my colleague could interact with the report by logging into


After my colleague was happy with the presentation of the data and a few more cleanup steps, I was able to setup the data refresh of the data set in Power BI. We already had a Power BI Enterprise Gateway installed on our SQL Server for another solution, so including my data set in the refresh was very simple with just a few clicks.

Now that our solution was deployed, our data stewards have logged in and subscribed to the dashboards. Every morning they get an email with a snapshot of the dashboard and a link to access the dashboard where they get direct access to the records in Dynamics or Salesforce so they can easily update those with missing data.

In summary, the Power BI platform is a great set of tools that are easy to learn. There is quite a bit of information available through various internet communities, so getting started is easy. As shown here, from idea to solution was less than one day for a very simple deliverable. The toolset can extend into much larger solutions as needed, so please give us a call and let us help you take the next step in your analytics journey within your CRM applications.

In our next Power BI post, we will discuss in more detail the step of getting your data and how to decide on Data Import Vs Direct Query.

Topics: CRM Best Practices CRM for Professional Services Microsoft Dynamics 365 Salesforce

Infographic - Dynamics 365: Fast Facts and Advice for Transitioning

In our continued effort to keep you up-to-date on the new and exciting Dynamics 365 platform, check out our infographic on Dynamics 365: Fast Facts + Advice for Transitioning.

Dynamics 365 infographic previewDownload the Infographic >>

Topics: Microsoft Dynamics 365

Dynamics 365 – Email Engagement

Continuing with our posts regarding the release of Dynamics 365, next up is the new Email Engagement functionality Microsoft has added to the core product.  Additionally, head over to the CRM Roadmap site, or the CRM What’s New site to see more of the features that have recently gone live. 

Email Engagement is the ability to see tracking statistics about emails that are created in, and sent out of Dynamics 365.   Or in other words, Email Engagement enables monitoring of activity taken by the recipient of the email.  Specifically you can monitor when the recipient:

  • Opened the message
  • Clicked on a link
  • Opened an attachment
  • Replied to the email

You also have the ability to schedule when the email should be sent based on when you think the most effective delivery time is for your message.  You can also set alerts to remind you when you should follow up on the email.  You can view additional information on Email Engagement from Microsoft via this link.

We’ll go into more detail in using Email Engagement below, but first lets discuss how to get it enabled.

Enable Email Engagement

In order to enable Email Engagement for Dynamics 365, you need to accept the Preview Terms and Conditions.  To do this, navigate to Settings –> Administration –> System Settings.  Then click on the Previews tab, and make sure you’ve checked off that you agree to the license terms, and enable Email Engagement.


On top of enabling the preview feature, you’ll also need to enable Server Side Sync for SharePoint and Exchange in Dynamics 365, and enable OneDrive for Business in Dynamics 365.

You’ll also have to enable document management for the Email entity, which can by done by going to Settings –> Document Management –> Document Management Settings.  Check the Email checkbox and you should be good to go here.

Finally,  you need to accept the Email Engagement terms and conditions in Dynamics 365 and set some other options (cards etc.).  This can be completed by going to Settings –> Relationship Insights.  With the initial screen, you’ll have to click on the “I have read and accept these terms and conditions” checkbox and click on Continue.  Then click on the Email Engagement tab, and click on the checkbox by “By enabling this feature, you consent to share your data…” and click on “Begin Setup.”


The setup process will then begin and could take some time, but once it completes, you’ll have to click on another checkbox next to “Turn on email engagement for your organization” and click on Save.  You should now be good to go to use Email Engagement!


Using Email Engagement

Note that Email Engagement only works for emails that are sent out of Dynamics 365 (versus emails sent from Outlook / Exchange that are tracked in CRM).

The first thing you’ll need to do is simply create a CRM email as you would normally.  However, now when you do so, you’ll see additional content on the email message in an Email Engagement section.


When new emails are created, they’re automatically followed.  You can click on the DON’T FOLLOW link to not follow this particular email.  However, there is a “Follow Email” field on the Contact that you can update to “Do Not Allow” and when doing so, the next time you create an email in Dynamics 365, by default the email will be set to not be followed.




You can click on View Preferences to see which recipients on the email have their setting set to Do Not Allow, and you can also attempt to retry following the email should the recipients’ preferences be updated.

Note:  That there seems to be a bug with this functionality currently at the time of this blog post.  When the email is initially created, it still shows that the “Recipient Activity will be followed” when the email form opens, regardless of the “Follow Email” preference on the contact record.  If you click on DON’T FOLLOW and then click on FOLLOW, that’s when you’ll see the indication above that one or more of the recipients prefer to not have their email activity followed.  A Microsoft Connect feedback item has been logged here.

From this area, you can also specify a time to actually send the email if you don’t want it to be sent immediately (based on research that you may have done that indicates best time to send specific communication).  Clicking the SEND LATER button will pop up a dialog that will allow you to pick a date and time for the email to be sent.


If you click on SET REMINDER you’re able to set one of the following reminders:

  • If a reply isn’t sent
  • If the email isn’t opened
  • Remind you regardless of lack of recipient activity


Both reminders and email scheduling must be done in the future, and the system will prevent you from setting them up for the past.  Once they’re setup, you’ll see the Email Engagement section change slightly which will allow you to modify the settings you setup, as well as remove them should you desire.


When you’re in CRM and looking at the relationship assistant, you’ll see a card for the reminders you setup that executed.  In this example, since the email wasn’t opened by the date specified, a card shows up for me indicating as such.  I can open the recipient, open the email, snooze the reminder card for 12 hours, or dismiss the reminder card.   Out of the box, these appear to only display on the Dashboards, and not on the actual Contact record.




You have the ability to not only follow activity on a particular email (opens, clicks, replies), but you can also follow activity on attachment views.  Each time an attachment is opened is counted as an attachment view.

In order to follow attachment activity, you must first save your email (don’t send it).  Then click on the + sign in the Attachments sub grid.

Once you Browse to the file and click on Attach, you’ll see a new Follow button.  After you click on the Follow button (which will upload the attachment to OneDrive for Business which you configured earlier), you’ll have the option to stop following, or simply close out of the attachments dialog.  You can always get back to the dialog to follow, stop following, and remove the attachment by clicking the attachment hyperlink in the attachment sub grid on the email form should you decide to do so later.





Recipient Activity

When you’re on an email that’s being followed, you’ll notice a new area Recipient Activity that shows a summary view of the number of opens, attachment views, link clicks, and replies.  Directly below the summary you can see each individual detailed activity which is rolling up to that summary.  Note:  I had to track the reply from the recipient for it to be counted as a reply (Dynamics didn’t automatically notice that there was a reply in Exchange and instead needed the reply in Dynamics to count).


You’ll notice that the location of where the email was opened is also tracked.  In this case I just opened it from my laptop, but it would also show if I opened it from my phone as well.

Recipient activity is also visible on dashboards in the new Relationship Assistant area as a separate card.  This is also displayed on the new Dynamics 365 tablet and phone apps, you can see the same card displayed in the new Landing Page


image image

The Email Engagement functionality extends a little bit beyond the actual email that was sent.  If you used an Email Template, Dynamics 365 will track the opens and replies that were made to emails that used that template.  Dynamics 365 will also let you know if a particular template is recommended due to past performance.  Below you can see that Dynamics 365 is recommending the Contact Reconnect email template due to past recipient activity. 


When a user goes to create a new email in the future, the recommended templates will be easily visible to select from via the green star indicator.


Topics: Microsoft Dynamics 365 Microsoft Dynamics CRM Microsoft Dynamics CRM Online

Troubleshooting Currency Rollup Fields

Today's blog post was written by Ian Moore, Senior Developer at Sonoma Partners.

Rollup fields are an excellent feature in Microsoft Dynamics that allow you to compute aggregate data for an entity across child records. They work great with currency fields - but if you run into trouble, you must be aware of some native fields that help control currency values.

We recently encountered an issue where currency rollup fields were not calculating for a particular account – other accounts in the system were fine, but one record would give warnings when it was opened.

Ian moore 1

The warning seems to point to the exact issue; one that can be common if you are loading data from external sources. Any record that has currency fields will automatically have a Currency (transactioncurrencyid) field added to it in order to have the correct value.

Trying to refresh the rollup field through the UI caused the following error pop-up with the same message:

Ian moore 2

The log file from this error also pointed to missing a missing currency somewhere in the rollup calculation:

Ian moore 3

The logical next step is to use Advanced Find to locate any records in this rollup that do not contain data for the Currency field, as well as verifying that the account itself had a Currency set.

In our case, everything looked in order. Both the account and all child entities in the rollup field contained “US Dollar” as their currency.

So, why the error?

It turns out there is a second native field involved for any currency data in Dynamics CRM: Exchange Rate

Adding Exchange Rate to our account form, we could see it was blank:

Ian moore 4

How do we set this field? Any effort to populate it through the API were fruitless – the value was simply ignored. What worked? Update one of the currency fields on your record to any value, save, and the system will automatically set the Exchange Rate for you.

Ian moore 5

With this value in place, our roll up fields calculated as expected!

Ian moore 6

If you’re having trouble with currency rollup fields, just remember to check two pieces of data:

  1. Currency field on the parent record and all child records
  2. Exchange Rate field on the parent record and all child records

Thanks for reading! If you run into further problems with this or otherwise, feel free to reach out.

Topics: Microsoft Dynamics 365

Quick and Easy Trello to CRM Integration

Today's blog post was written by Angel Shishkov, Principal Developer at Sonoma Partners.

At Sonoma Partners, we use CRM to track our internal work tasks, among many other things. Some of our clients and projects use their own systems for work and defect tracking, like Jira, Trello, or Excel, so we often have to consolidate data between the systems.

Today, I am going to talk about a quick and easy integration we built to bring Trello cards into CRM tasks.


First of all, I will assume you know what Trello is and how it is used. In this particular case, we used the cards as the equivalent of defect reports, along with comments, image attachments, and moving the card between different lists to indicate a status change. The manual process was to have our QA open the card in Trello, review the comments, create a record in CRM, and manually copy the card contents into it. The goal was to automate this process and eliminate the manual copying of the card contents into CRM.


I’d like to qualify what I mean by “quick” and “easy,” since both of those are relative terms. As far as integrations go, this one is quick because you could set it up in less than a couple of hours, and it is easy because it does not require you to learn the intricacies of either system being integrated (Trello and CRM in this case). There is some code involved, and your mileage will vary based on your development experience.

We need a way to create a CRM Task from a Trello Card, so we are going to need a way for the user to trigger this action while they have the Trello card open. For this example, we are going to use a Chrome Extension to put a button in the Chrome toolbar for the user to click. The actual logic we will write to read the Trello card and create the CRM Task, however, is not specific to Chrome Extensions.

The way we are going to connect the two systems is where the “easy” part comes in – we will not use either the Trello, CRM API, or SDK to do this, so you do not need to learn either. We are going to pull the Trello card’s contents through the Trello JSON feed, which is a feature that allows you to get a card’s contents in JSON format simply by adding “.json” to the end of the card’s URL. Since the user already has the card open in their browser, this should be easy. As for creating a Task in CRM, we are going to cheat a bit and not actually create the Task, but rather open a new Task form and pre-populate the subject and description fields with data from the Trello card. The user can then review the Task, make any changes, and hit Save to create it in CRM.


We need to set up our Chrome Extension first, however, I will not go in-depth about Chrome Extensions since that isn’t the focus of this article. I will lay out the basic steps, and know that there is much more detail online for those interested.

  1. If you have Visual Studio or you have done this before, you can use the Chrome Extension project template available here.
  2. If you are setting up the extension folder manually, create the following folder structure:
    1. app
    2. app\img
    3. app\lib
  3. In the img folder, put a 19x19 pixel image file called, "icon.png." This will be the icon of the extension in Chrome.
  4. In the lib folder, put a copy of the minified jQuery library. You can download it here. In this example, we will use jquery-3.1.0.min.js
  5. In the app folder, create the following three files. We will add content to them later.
    1. json
    2. html
    3. js

Now you should have your three folders set up with some files in them. Let’s add some content.

Open manifest.json in a text editor.

  1. manifest.json is the file that tells the Chrome Extension what components are included, what permissions are required, etc. Paste the following and save the file. If you did not use the file names above, make sure to change them below as well.

Open popup.html in a text editor.

  1. popup.html is the little web page that will open when you click on your extension icon in the Chrome toolbar. We don’t strictly need a web page for a simple extension like this, but we will add one for future enhancements anyway. Our web page has a title and a button for the user to click. Paste the following and save the file.

Open popup.js in a text editor.

  1. popup.js is the JavaScript “code behind” for the HTML page we set up above. It will handle the button click, read the Trello card, and open the CRM Task form. We are going to paste the whole code in there, and I will explain the functions individually. There is one part that you will need to edit in this code. The part marked with a //TODO comment has the URL to the CRM org. Replace yourorgurl with your CRM org URL. Paste the following and save the file.
  2. We will begin at the bottom first. The part that start with “document.addEventListener” just tells the page to call our init() function when it has loaded (that is, whenever the user clicks the extension icon in Chrome, which causes the page to display).
  3. Back up at the top, “TrelloToCRMController” is just a nice way to encapsulate all our logic into one “namespace.” All our methods are inside this namespace.
  4. Taking the methods from the bottom again – the init() function is what is called when our Chrome Extension webpage opens. It finds the Create Task button on the page and attaches a click handler function to it. This function will get called when the user clicks the Create Task button and it is called btnCreateTask_Clicked.
  5. The btnCreateTask_Clicked() function is called when the user clicks the Create Task button. It uses the Chrome Extension API to get the currently active tab in the browser and pass it to the createTaskFromTab function.
  6. The createTaskFromTab(tab) function takes a Chrome tab as a parameter and is the main function that reads the Trello card and opens the CRM task. It goes through several steps:
    1. Append “.json” to the end of the URL of the current tab (which we assume to be an opened Trello card). You can try this in your browser – open a card in Trello, then edit the URL in your browser to add “.json” to the end. This will take you to a page that has a JSON representation of the card. JSON is a format that is easily read by JavaScript into an object we can use in code. There is a comment in the code that shows the basic JSON format for a Trello card, or you can use a JSON visualizer online to check it out yourself.
    2. Call getJSON to retrieve the JSON contents of the Trello card. We are using jQuery, which was included in the extension during setup, so we have access to the $.getJSON method. It is an asynchronous method, so the rest of the code is inside the callback function.
    3. We are going to set two fields on the CRM Task – the title and description. The title will be the card name, but we want the description to be a list of all the actions on the card – comments, attachments and moves from one list to another. These actions are stored in the card.actions collection, so we loop through all of those to construct a description string.
    4. There are different types of Trello card actions, such as “commentCard”, “updateCard”, etc. They have slightly different properties, so we have a case statement to process each. For “createCard” we just log who created it. For “commentCard” we record the comment text. “updateCard” is a move from one list to another, so we record the previous list and new list in the string. And for “addAttachmentToCard” we just record the URL of the attachment.
    5. Once the description string is prepared, the last piece left is to open the Task form in CRM. Forms in CRM can pre-populate their fields with data based on parameters passed in the URL. Specifically, there is a parameter called “extraqs” that can contain a list of name/value pairs of field names and their values. We are going to use this feature to open the Task form with a pre-populated subject and description. Finally, the newTaskUrl variable is the URL to a new Task form in CRM and we use the Chrome API to open a new tab to that URL.


This is the last step (besides all the bug fixing and enhancement requests that will come) in the example. Since we used a Chrome Extension to host our solution, we will need to install it in Chrome to test it out.

  1. Open Chrome, click the ellipsis on the top-right for the menu and open the Settings page. Select Extensions on the left.
  2. Check the Developer Mode checkbox on the top. This will display a couple of extra buttons. We are going to use Developer mode to quickly deploy our extension, so we don’t have to bother with deploying it to the Chrome app store.
  3. Click the Load Unpacked Extension button on the top. If you don’t see it, make sure Developer Mode is checked.
  4. Browse to your “app” folder and select it, click OK.
  5. You should see your extension appear in the list on the Chrome Extensions page. Make sure Enabled is checked and there are no errors. If you make any changes to the code, you can come back here and click Reload to update the extension with your latest changes.
  6. You should now see the extension icon you added during Setup show up in the top right of the Chrome browser.
  7. Open Trello, browse to a board and open a card to test with. With the card open in the Chrome tab, click the extension icon. A small webpage will drop down with a Create Task button. When you click it, a new Chrome tab will open with your CRM task. Congratulations!


This is a relatively simple and bare-bones integration. It is not very configurable, has no error handling and doesn’t look great, but it gets the job done. If you are looking to expand on this or build something much more complex and you need some help, give us a call. Thanks for reading!

Ease into the cloud with Microsoft Dynamics Lifecycle Services

Topics: Microsoft Dynamics 365

Migrating and Integrating Dates to Microsoft Dynamics

Today's blog post was written by Rob Jasinski, Principal Developer at Sonoma Partners.

Whether migrating data into CRM from a legacy system or from an other external source or handling an ongoing integration sync into your CRM environment, handling dates can pose unique challenges. In CRM, dates are actually stored as date and time, even though there may be no time portion to the date. If no time is entered or supplied, it is defaulted to 00:00 (midnight). Also, the time portion is stored as UTC in CRM. When migrating data into CRM, the time zone of the user that is migrating (or integrating) the data is used.

So, for example, if the user is in the Central time zone, and a date of “10/15/2016” is passed into a field called birthdate, first “00:00” time is added to the date, then CRM converts the date and time to UTC. So it finally is stored as “10/15/2016 06:00” (+6 hours for CST) in CRM. Even though the time portion may never be displayed to the user, CRM is still always converting this date and time to the user viewing the data’s native time zone. Now if a user in the Mountain time zone is displayed this date, they will actually see “10/14/2016” in CRM. The reason for this is the date was migrated with no time, so it defaulted to midnight CST (since the user used to migrate the data was in the Central time zone). Internally, CRM then converts this to “10/14/2016 11:00pm” for the users in the Mountain time zone and since time may not be displayed, the user may only see the date portion, “10/14/2016”. This can be confusing and ultimately, the wrong date is displayed to the user.

There a couple of workarounds for this. First, instead of using a date field, use a text field in CRM and store the date as text. The problem with this is the date cannot be used in any date calculations or native CRM date filtering logic. The other workaround is to take the time portion and change it to 12:00 (noon). So in the example above, modify the date to “10/15/2016 12:00” before passing it into CRM. Once CRM converts this date to UTC, it will still allow for a 12-hour leeway, in either direction, for time zone conversions. So, in the example from earlier, a date of “10/15/2016 12:00” would be stored as “10/15/2016 18:00” in CRM. This date, displayed to a user in the Mountain time zone, would convert to “10/15/2016 11:00” thereby preserving the actual correct date once displayed.

If the time portion is required (i.e. for appointments, transactions, auditing, etc.) or if your CRM implementation is global, then this work around will not be the right solution. But if the time data is needed, then this is usually not an issue since the time portion would most likely be displayed to the user anyway.

Ease into the cloud with Microsoft Dynamics Lifecycle Services

Topics: Microsoft Dynamics 365

CRM and Yammer, Together Forever

Today's blog post was written by Ross Talbot, Principal Developer at Sonoma Partners.

Never underestimate the value of collaboration within your organization and Microsoft Dynamics.

In our previous post, we covered Activity Feeds as one option for promoting collaboration at your organization through CRM. Whether it is visibility regarding sales within your organization across functional areas in your organization or alerts within your team to provide status updates on deals in progress, both manual and automated options allow you to leverage Activity Feeds within your Dynamics 365 instance to enhance your team’s ability to collaborate. 

Going through collaboration options in Dynamics (hereafter also referred to as "CRM"), we will be looking at Yammer in this post. Connecting Yammer to your CRM instance replaces Activity Feeds; the two cannot co-exist. It is important to note that there is not a native way to remove Yammer once it has been configured in your CRM instance, but more on that later. For now, consider testing this in an instance you can reset if you find Yammer just isn’t the right fit for your organization.

To get things started, we need a Yammer network to use. For this example, we have a new Yammer network and will link it to a CRM Online instance. Detailed configuration information from Microsoft can be found here. Yammer configuration is found in CRM under the Settings > Configuration section. You need an appropriate security role (we are using a System Administrator account) to continue.

Rt 1

Give your consent to link Dynamics CRM Online and Yammer in the configuration page, and now we are really ready to go. This approval will replace the Activity Feeds in CRM, commandeer the social pane on records, take over as the centerpiece on the out-of-the-box social dashboard, and become the behind-the-scenes target for your system and user posts going forward (so this is important if you are using Activity Feeds already).

Rt 2

You will want to consider your options for the next two choices, so we want to explore the downstream effects of your options. I recommend using a specific Yammer group. The default is blank, which will direct posts to the “All Company” group in Yammer. This group is not configurable on the Yammer side and all users (regardless of their user status within CRM) will see posts in this area. The decision point here should be focused on cutting down noise for non-CRM Yammer users since All Company is a group everyone sees. One of the benefits is that you may want all users to see those posts, but a group named after your CRM Production instance also helps categorize these posts so even if everyone joins the CRM group, it makes the posts more meaningful. You also may want all users to see posts regardless of their CRM Access, so you want to choose the option that fits your needs best. The goal is to give the posts focus when needed and ensure that people won’t miss something that is valuable to them.

Up in Yammer, we will create a group called “CRM Production Blog” for this example. The reason we denote it as production is that we likely have at least one sandbox/lower lifecycle instance of CRM and when we test auto-posting options, we will want to ensure it is clear which instance of CRM the posts belong to (again more categorization/noise reduction for your production users than anything else). This will be the default group, but that can be changed when posting to target a different parent group. Note that if you copy a production instance to a sandbox for testing purposes, this configuration will need to be updated to match the Sandbox group in Yammer at that time.

Rt 3

Rt 4

Never overlook the next setting option or assume its meaning, as public versus private posting is next on our list to review. Since the group is configured for all of CRM, or All Company if you choose to leave the default as is, this privacy setting may also be useful in cutting down the posts in CRM that may not apply to all of your CRM users. This setting only applies to Yammer in CRM though, as posts will be available in Yammer itself under the CRM Production Blog group in our example and all members of that group can see the contents. This is more of an obscurity setting than a security setting, so you want to choose the option that makes sense for your setup. Security itself is not shared between CRM and Yammer, so you will want to ensure that information you need truly private is stored in a place like CRM with more granular record security. Yammer does have private groups, but the default group linked to CRM would then need to include all CRM users for collaboration purposes which would defeat it. 

Going back to the configuration, I recommend using public unless you have a need to switch this setting. Collaboration works best when more people are involved and if the content will be relevant, you want your team to see it. For this example, however, I will show what setting this option to private looks like so it gives you a better look at the CRM and Yammer possibilities.

Rt 5

To configure Yammer and CRM with the private setting, we just switch the setting in the configuration panel. Unlike so many places in CRM, there is no OK or Save button, and these options auto-save. I usually verify by navigating away and then back to the Yammer configuration page to ensure my changes stay in the system.

Rt 6

Let us now head to a CRM record to review what private configuration looks like to the user. The social pane will show Yammer posts on a record only if the current user is following that record. If a user is not following the record, they will see the message below. They will see a gap for the “missing post” on the Social Dashboard instead of this message.

Rt 7

You now want to follow the record in CRM to make the posts visible in both places. We can now see posts related to the record made by other users and can reply with additional posts or comments of our own. The social activity dashboard will show posts in the CRM group for records you follow or posts made in the group itself unrelated to records.

Rt 8

Down in the record’s Yammer feed, we can change the target group of our post in addition to adding our post text to ensure we get the visibility we need. We now add our post to the record’s feed. It is now visible on the record wall, social dashboard, and in Yammer for those who have access to each location. This will get eyes on the post that are not members of the CRM Yammer group.

Rt 10

Never miss an automation opportunity, either. Configuration posts can target Yammer as well, so the automated posts from Activity Feeds can be updated to post to Yammer from CRM. We navigate to Settings and choose Activity Feeds Rules. Opening the rule for a New Account, we note that the checkbox is checked for “Post to Yammer Activity Stream” on the form. This shows in CRM as a system post in a record feed and in Yammer under the Recent Activity section on the right side. The automatic posts work the same as Activity Feeds, and if you want to customize the content of these posts, you will need a workflow assembly or plugin to do so. This can give awareness to users in different areas of your business about new customers that different business segments should be looking to target or opportunities with customers shared across segments.

Rt 11

Going into more detail on the CRM and Yammer record links, this is built on Open Graph objects. The link contains a few actions and whether you are looking at this in CRM or Yammer, these functions pertain to Yammer. We will start with the options shown as you hover over this link as shown below.

Rt 12

To start, you will see a “Follow” link which is similar to a concept in CRM, but they are not related. The Yammer Follow shown here will follow the thread in Yammer only. If posts are made in a record’s thread and your integration option is set to Private, you would still need to follow the record in CRM to view the record’s wall. The Yammer follow affects posts and comments you see when you filter your Yammer feed to Following as opposed to All or Discovery.

Rt 13

Run back to the link options, and let’s look at share next. Again, this is a similar concept to CRM but unrelated. Sharing in this Yammer context allows you to send the link as a private message to a Yammer user or to share a copy of this link in another Yammer group. Share is only a visible option when viewing this link in Yammer and not in CRM.

Rt 14

Around the right side of this list, we see a “Go to Page” option. Clicking this launches the full thread for the graph object. The name of the record, the type, creation timestamp, and link to the record in CRM appear at the top of the thread. Posts and comments regarding this record are shown in this thread with new posting options similar to posting in a Yammer group. You also will see additional posting and commenting options that are not available with the Yammer feeds embedded in CRM (for example attaching a file) when viewing threads and groups in Yammer itself.

Rt 15

And there are more options just below the link as well, although most are only visible in Yammer so I will list them at a high level. Like, Bookmark, and Email Me should be self-explanatory, and reply will just add a comment to the thread. Share functions the same as the link, but with the post’s thread instead of the graph link. Stop Following will remove your follow from this post. View conversation will open the thread in its own window, but unlike the page this is for the post’s thread not the graph object’s which can contain multiple posts and their replies. Adding topics will add hashtag topics to the post for increased search ability. Delete will only show if you have permission to delete the post, otherwise there will be a “Hide Conversation” option instead to remove it from view. Note: Only the Like, Reply, and View Conversation options are visible from CRM.

Rt 16

Desert Yammer if you feel this is not the right fit for your organization. CRM does not actually give you the option to remove Yammer from your CRM instance (and that is the reason for the title of this post), however the OrgDBOrgSettings tool found here can accomplish this with a button found just under the list of settings. Just install the managed solution from Codeplex, and you can switch your organization to another method of collaborating if Yammer isn’t a fit for you.

Rt 17

You want to select the right collaboration tool for your organization and in summary, Yammer provides a bit more than Activity Feeds as far as options are concerned. Yammer gives you the ability to include users outside of CRM in your collaboration. It gives users the ability (if desired) to see posts about records they may not have access to so they are aware of high level information, such as an opportunity from another department for a shared customer. Yammer provides the ability to have non-CRM related conversations as well for interests other than work (sports, movies, music, you name it). Yammer also provides similar functionality to Activity Feeds, so if you have non-CRM users that you want involved in your collaboration, Yammer might be for you. You also may have heard about some upcoming changes with Yammer, and you may be aware of other collaboration options within Dynamics, so stay tuned for more updates here!

Topics: Microsoft Dynamics 365

Dynamics 365 & Flow – 3 Simple Steps to Email Sentiment Tracking

If you’re not familiar with Microsoft Flow yet, it is definitely worth checking out.  It allows you to easily connect many different applications, one of which is Dynamics 365, to each other.  Earlier this year, the ability to connect to Microsoft’s Text Analysis API was added which takes in a string of text and returns a sentiment score from 0 to 1 with 0 being negative and 1 being positive.  This means we can painlessly connect Dynamics 365 to the Text Analysis API which I will walk through in this post in the form of Email sentiment tracking.

The first thing we need to do is create a custom decimal attribute on the Email entity to track sentiment.


Once that attribute is created, navigate to Microsoft Flow and create a new blank Flow.  In the “search for more triggers” box, type “create a record” and choose the Dynamics 365 option.  You will need to authenticate to your Dynamics 365 environment and then select your Organization Name from the list.  Once that is done, select Email Messages from the Entity list as well.


Next, click “+ New step” and select “Add an action” and in the “Search for more actions” box, type “sentiment” and select the “Cognitive Services Text Analytics” option.  You will then need to sign up for Cognitive Services and provide your API Key to Flow.  It is free to try for up to 5,000 API calls per month.

Once you provided your Cognitive Services details, put your mouse cursor in the “Text to analyze” box and a sidebar should show up with a list of options like so:


Find “Description” in the list and select it.

Next, click “+ New step” and “Add an action” again.  Search for “update a record” and choose the Dynamics 365 option.  Again select your Organization and Email Messages.  Highlight the “Record identifier” box and choose Email Message from the sidebar list of options.


Then click the “Show advanced options” at the bottom of the Update a record section.  This will expand the section with a big list of Email attributes.  You should be able to find the custom Sentiment attribute that we created in the beginning of this post. 

Highlight the Sentiment text box and select Score from the sidebar list of options.


That’s it!  The Flow is complete so you can give it a name at the top of the page and then click “Create flow”.

In the list of Flows, make sure the toggle control is set to On.


Now in your Dynamics 365 environment, create a new Email record and save it.

Back in Flow, click the circle icon with an ‘i’ in the middle.


This will show a history of runs for the Flow.


Once you see that your Flow was successfully ran, go back to your Email record in Dynamics 365 and you should see the Sentiment field populated.


Now all emails created in Dynamics 365 will have a sentiment value populated.  You could even extend it further and add a native Rollup field to Contact to store the average Sentiment across all emails that were sent by the Contact.

There is a caveat that the Text Analysis API is only free for 5,000 calls per month.  Below is the pricing chart taken from the Cognitive Services pricing page:


Topics: Microsoft Dynamics 365 Microsoft Dynamics CRM Online

PowerApps with Dynamics 365 Update

Back in October 2016 I posted a step by step instruction for creating a basic contact application using the PowerApps preview designer with the new Dynamics 365 connector.

Today, I provided an encore presentation for the CRMUG. So, in preparation for the webinar, I went back through the steps using the new production version of the PowerApps studio. As I guessed, some fantastic updates to application were deployed, which prompted changes and new screenshots for our original application. Our original post was updated reflecting the changes as of today.

I am sure there is a more comprehensive list somewhere, but listed below are a few the differences & improvements I found useful for updating my contact application.

  • The default Dynamics 365 contact app now includes a refresh icon/functionality.
  • The 'Theme' functionality is no longer on its own Design tab. It is on the Main tab, but isn't readily discoverable if your window is too small.
  • The PowerApps team added support for multi-environments. Learn more at
  • You can now search for advanced properties. Super nice!
  • More properties are exposed in the ribbon, making it easier to change them without having to go and search in the Advanced tab.
  • Added an application description field. Doesn't sound like much, but when you start creating a lot of applications, it is nice to have more context about them. Smile
  • The default icon size appears to be larger than the preview. We still recommend using the search icon and sizing it the same as the text box height, but added some padding to make it look better.
  • Overall performance of the client was improved. I am sure they are still making further improvements, but the latest version was noticeably faster than the preview.


Should you need to submit ideas or help with your apps, please use the following forum link:

There two forums for you, support and ideas.


The PowerApps team uses these sites for feedback and will forward any Dynamics 365 connector questions to the Dynamics team where appropriate.

Topics: Enterprise Mobility Microsoft Dynamics 365