Tip #1033: Use Fiddler to boost client-side development

Today’s tip is from Matt Beard – thank you! And, hey, you can be a guest tipster too – just send your tip to jar@crmtipoftheday.com.

As a CRM developer, I regularly run through this exact process step by step when writing WebResources such as HTML or Javascript and I’m sure others do too.

  1. Write your code in your IDE of choice
  2. Find/create the WebResource in CRM
  3. Choose your File
  4. Save & wait
  5. Publish & wait some more
  6. Navigate to the form & Refresh
  7. Find your made a tiny mistake meaning you have to repeat 1 through 6 again!

I’ve always disliked this long winded approach, until I found out about AutoResponder within Fiddler! AutoResponder lets you write a rule, either with an exact match or a regex match and allows you to return a local file to the browser rather than the original.

In this example:

Mapping web resource file in Fiddler

When we try to load the “mb_customwebresource” file from the Dynamics system, we would actually be given the one from my local hard drive meaning all I need to do during my development is make my code change, save the file locally and refresh the htm!

If I tried to actually calculate how much time this has saved me in the last month alone, my employer would be a very happy chap!

Tip #1032: Be careful with those function names

NamespacesToday’s tip is from Tom Pickles – thank you! And, hey, you can be a guest tipster too – just send your tip to jar@crmtipoftheday.com.

I fixed a curious issue today that I thought I’d share. Users had reported that when using the multi-edit form to update multiple cases, the form would freeze when they save, and never close. The records were updated, but you’d have to force refresh the browser window to continue.

After some digging, I found that this only happened when the script containing all our custom case form functions was loaded on the form. The curious thing was that the error occurred even when no functions were being called on the form, so it was purely the presence of the script that was causing the issue.

So what gives? A script sitting there doing nothing should cause no issues. It wasn’t until I started commenting out large chunks to narrow down the problem, that I hit upon the answer… a custom function named “closeWindow”.

As soon as I changed the name of this function, all started working as normal. I can only imagine that there is an internal function called “closeWindow”, which is called when closing the multi-edit form specifically. Instead of calling that, it was trying to run our one, which doesn’t work in that context.

So I guess the moral of the story is to be careful with those function names! Who knows what could be calling it…

Tîpp Jäår

Well, well, well… It sounds like a good case of spießrutenlaufen here! I truly hope that Tom either didn’t write those functions or that he did learn his lesson. Jason “I can make a kettle talk to CRM” Lattimer forewarned us about the importance of the namespaces in Javascript, like, uhm, 5 years ago but it’s never late to be reminded again!

Photo by Samuel Zeller on Unsplash

Tip #1031: Stay safe with good passwords

Every now and then good things come out of England. Convicts shipped to Australia, fish & chips, and a bunch of MVPs, to name but a few.

The National Cyber Security Centre (YES, CENTRE), is one of those things. The entire site is full of goodness but their Password Guidance should be a mandatory reading for all IT folks, whether security related or not. That includes us, Dynamics 365 mob.

Password infographic

Read about password overload, the limitations of machine-generated passwords, and lots of other things. Then print their poster and hang it on the wall at your workplace. Even if it’s your living room.

Tip #1030: Video Guide to Portal Content Wizard

Wizard with magic ballIn this video, we will look at the new Portal Content Wizard, that was introduced with the newest version of Dynamics 365 portals. We will show you how you can use this wizard to quickly create Web Pages, Entity Lists, and Entity Forms.

YouTube player

Give us your feedback, all of it: good, bad, and ugly, I’m sure we can take it. Suggest new topics either in comments or by sending your ideas to jar@crmtipoftheday.com.

Don’t forget to subscribe to http://youtube.com/crmtipoftheday!

(Photo by Michal Lomza on Unsplash)

Tip #1029: Get notifications about Dynamics 365 service issues

If you use Dynamics 365 online, and you want to be notified about any service degredation or online service issues, install the Office 365 Admin mobile app (available for iOSand Android).

Once you install the app (if notifications for the app are turned on), if there is a service notification for Dynamics 365 (or other Office 365 services), you will receive a push notification on your phone.

Tapping the notification will show you the full details.

Tip #1028: Prevent duplicate contacts the Viking way

Marius “CRM Viking” Pedersen gave us a great tip about how to prevent duplicate contacts from being created in Dynamics 365:

I set emailaddress as alternate key on contact once. That actually worked very well to prevent duplicate contacts from being created. It also required that all contacts must have an email address.

You have to start with clean data, either at the beginning of a deployment, or deduplicate your contacts, as you cannot create an alternate key on a field that contains duplicate data.

An additional benefit is that when you use the web api the email is an alternate key, so you can retrieve and update data using the emailaddress1. So if you push data from your ERP solution you don’t have to create a mapping between MSDYN customerid and ERP customerid.

Want to be cool and fearsome as the CRM Viking? Send your tips to jar@crmtipoftheday.com.

Tip #1027: Quick fix for the date format in portals

When I roll out the new Dynamics 365 portal, especially for a demo, the first thing I want to do is to change the date format. Why? Because of this comprehensive map of all countries that use the MMDDYYYY date format:

Comprehensive map of all countries that use the MMDDYYYY date format

In Dynamics 365 go to Portals > Portal Languages and open English record. Change the LCID to a locale with a suitable date format, e.g. 3081 for Australian, 2057 for United Kingdom, etc (see the full list here).

You’d still have to put up with ‘Z’ instead of ‘S’ and deal with colors not colours, but at least you won’t turn up for a meeting scheduled for 1/2/2018 on the 2nd of January.

Tip #1026: Change your perspective on tracking email

Recently at the Extreme 365 conference someone asked the expert panel about tracking of email. Specifically, how to make the new app for Outlook automatically track all email like you can with the legacy Outlook Client.

My first response was that it absolutely could still do that.

In the Outlook client, you can set a setting to track all email. With that setting, all incoming email will be tracked, and outgoing messages will automatically be set to track as well (which makes the “track” button automatically selected on any new message created).

In the Outlook app, the same result can be achieved by setting the user option to automatically track all incoming email. For outgoing email that I send, creating a folder-level tracking folder and an exchange rule to automatically copy all sent email to the folder will result in all sent messages being tracked. Note this does not “set regarding,” but neither does the Outlook client auto-tracking option.

So if big brother wants to track all messages sent or received by a user, this is possible with the new Outlook app.

But a different perspective is maybe we should rethink our approach to tracking email. Companies using Dynamics CRM for 5-10 years now have built up vast quantities of tracked email messages. While these messages are of some value (sometimes extreme value, when a client complains about something, and you need to see the email history), the noise to value ratio is quite high.

Also, the Outlook tracking feature is no longer a competitive advantage to Microsoft. Salesforce and other CRM vendors have added similar functionality, rendering email tracking a commodity feature.

I would encourage anybody who wants to automatically make email messages visible within Dynamics 365 to consider the auto tracking capabilities of relationship Insights. With relationship insights, emails from clients are visible to users within Dynamics 365, even if they have not been tracked in the system, and the relationship assistant can intelligently alert users to customer issues and requests.

Business relevant emails can still be tracked in the system for public consumption; however, by using relationship insights, you will add value to user experience, provide proactive recommendations that drive user actions, not annoy users, and increase user adoption.

Tip #1025: Updating Note with Workflow

Today’s tip comes from Nicholas Hayduk. You can be a tipster too, just send your revelation to jar@crmtipoftheday.com.

I’ve learned the hard way many times that you need to try something in CRM before claiming it is possible. Recently I was helping someone on the CRMUG forums with a problem involving notes and workflows. There was an action creating a note, and they needed to update the text of the note after it was created to make the note appear on a portal. I knew it might be a bit tricky to get a reference to the note that the action was creating, but if I solved that problem, surely I could use standard workflow functionality to update the note text, right?

Unfortunately not. While you can create notes with a workflow, editing them is not possible. If you create a workflow that runs on the note entity, and choose the Update step, the note won’t appear in the list (only the related entities will).

No notes in workflow

I’m not sure why this limitation is in place, but thankfully there is a pretty simple solution; Jason Lattimer has created a solution that include a number of very useful custom workflow activities, available at https://github.com/jlattimer/CRM-Note-Workflow-Utilities.

Tip #1024: Make an entity regarding available from Outlook App

If you use the Dynamics 365 App for Outlook (the new Outlook interface), when you set regarding, you may notice that not all of your entities are available. Yet there is no “Outlook” checkbox on the entity. How do determine which entities are available to be selected as regarding objects for email from the D365 Outlook app?

The entities must meet the following conditions:

  1. Be activity enabled (check the activity checkbox on the entity configuration)
  2. Be mobile enabled. Outlook App and CRM Mobile App share the same interface, and if the entity is not mobile enabled, you will not be able to select it for the regarding record in the Outlook app.

This also means that the small number of system entities that cannot be mobile enabled (mainly goals, marketing, and legacy service entities) cannot have related activities tracked via the D365 Outlook App.