Tip #960: If your FetchXML-based report preview is not working

You are writing a FetchXML based custom SSRS report . When you click the “preview” tab in SQL data tools, the report runs without error, but does not display correctly. Maybe there are records missing, or you enter a parameter value that should return data, and it does not display any results. Is your report wrong? Are you crazy?

The answer is maybe, but probably not. You are likely running into what almost every FetchXML report author has experienced from time to time–when you preview a report in SQL data tools, the Report Authoring Extensions only retrieve the first 250 records. So if you select a parameter value that doesn’t have any results in the first 250 rows, your report will not display any data.

That’s why the first rule of FetchXML SSRS Report test club is

Test the report in CRM, not in Visual Studio

(Rule number two is move to a more powerful reporting platform like Power BI).


Tweet about this on TwitterShare on FacebookShare on Google+

Tip #959: Getting ready for D365 v.9: Learn Microsoft Flow

So you have probably heard the news that Microsoft Flow is going to be integrated in Dynamics 365 v.9, allowing Flow to be managed and run directly from the Dynamics 365 menu.

But maybe you haven’t paid much attention to Flow (not even Tip 880), but now that it is going to be “in” CRM, you want to start learning more about it and how you might use it. But where do you start?

  1. Start with this post from the Microsoft Flow team. It does a good job of succinctly describing the primary Dynamics 365 triggers and actions, and shows examples.
  2. Sign up for Microsoft Flow at flow.microsoft.com.  If you don’t already have a license, you can sign up for the free version (which has limitations) or you can sign up for a 90-day trial.
  3. Once you sign in to Flow, click “connectors” and scroll down to “all connectors” and click on Dynamics 365. Under the description of Dynamics 365, you will see a link to see documentation. This will give you documentation for the triggers and actions available for the Dynamics 365 connector.

4. Look at the templates. There are dozens of great templates for common Dynamics Flows that you can use as a starting point. Things like synchronizing records between Dynamics 365 Customer Engagement and operations, creating records like cases based on social media posts, adding records to Dynamics from a spreadhseet, and more. Even if these aren’t exactly what you are looking for, they can give you great examples of how to build Dynamics Flows, and you may be able to find one that is close and make some minor modifications rather than starting from scratch.

5. Learn the plans. There are several different Flow plans, and pricing differs based on number of executions per month, frequency of execution, and connectors needed. As you think through how Flow will be used in your Dynamics 365 deployment, consider what the expected volume will be to determine the associated cost.

Bonus tip: When you get deep into Flow, you will likely want to filter a list of Dynamics records to be updated or deleted by a Flow, and you will want to use an odata query. But if you are not a developer that speaks odata, the good news is there is a tool for that (actually several).

One such tool is the Fetch XML Builder in the XRM toolbox.

After you build you query, click “View” and select “Show oData equivalent.”

(Thanks to Scott Sewell for this bonus tip).

Tweet about this on TwitterShare on FacebookShare on Google+

Tip #958: Segmented solutions and lookup fields

Dynamics CRM 2016 or later allows configurators to build segmented solutions that only include the fields, views, and entity components necessary, rather than adding the entire entity to the solution.

Be aware that if you add a lookup field to your solution that references an entity that is not already part of the solution, Dynamics will automatically add the entire lookup entity to the solution. This will make your solution not so skinny.

The recommended best practice to avoid this from happening is to first add the lookup entity to your solution, without all of its baggage, then create your lookup field.

Tweet about this on TwitterShare on FacebookShare on Google+

Tip #957: Configurator’s Dilemma Revisited

Last week I was in a discussion with a colleague and the topic of whether or not he should re purpose the opportunity entity came up. He had a scenario that was somewhat similar to opportunities, but was not a sales opportunity. This lead me to rediscover a blog post I wrote 8 years ago for the Dynamics team blog called The CRM Configurator’s Dilemma to answer the question “should you re-purpose system entities or create new entities?”

My advice from the post, with updated comments:

  1. Consider the future

Still valid, even more so. The future of Dynamics is moving much faster than it was back then, using entities in non standard ways can cause problems if Microsoft makes changes to the entity that you are using. Also, if you choose to re-purpose a little uses system entity like contracts, there is a good chance that Microsoft will elect to deprecate that entity in the future. Custom entities don’t get deprecated.

2. Consider the overhead

When I wrote the original post, there were a number of system entities that had certain fields that could not be removed from the forms. This has changed somewhat as system entities have been refreshed and modernized, but there are still fields on entities like opportunity, case, and campaign that cannot be removed from the form. 

3. Consider the user experience

This still applies–if your use case is less that 50% in line with the standard entity functionality, a custom entity will typically give users a more simple user experience than scaling down a more complex system entity. Plus we now have the ability to add business process flows to any entity, including custom entities, which can easily make a custom entity use experience as good or better than re-purposing a system entity.

Final thoughts

The advice 8 years later is still the same–don’t re-purpose system entities. There is even less reason to do so now–one of the biggest reasons that configurators 10 years ago would re-purpose system entities was activities–users wanted an activity type that wasn’t a fax, email, appointment, or task, so the configurator would grab one that wasn’t being used and re-purpose it. Now we have custom activity entities, this is no longer necessary.


Tweet about this on TwitterShare on FacebookShare on Google+

Tip #956: Encryption error when configuring Dynamics 365 for Outlook

You try to configure Dynamics 365 for Outlook (legacy Outlook Client) against a sandbox organization that has been copied from production, but when you do, you get an encryption error.

This error can be caused by restoring a copy of a production environment that has data encryption enabled and not restoring the encryption key. If your production environment still exists, in Production go to Settings | Data Management | Data Encryption and show the key.  Copy it.

Then in the sandbox organization, go to the same location and paste that key into the activate box.

In case you no longer have the original organization, follow the instructions in Tip 243 to wipe out the encrypted fields.

Tweet about this on TwitterShare on FacebookShare on Google+

Tip #955: If your Flow is not flowing

In a recent MVP discussion, a question was asked about a Microsoft Flow that was not being triggered on update of a custom entity.

David Yack pointed out that Microsoft Flow currently uses Change Tracking to trigger on record updates and deletions. If you find that your Flows are not flowing when changes happen in Dynamics, verify that change tracking is enabled for the entities upon which the Flows are based.


Tweet about this on TwitterShare on FacebookShare on Google+

Tip #954: Voice of the Customer image file size limit

One of the ways that you can make Voice of the Customer your own is to brand it–change the theme colors and add images. However, the image files are a bit of a mystery–they are not CRM image web resources, and don’t follow the same logic for file sizing. And the available documentation does not clarify the size limits of VOC images.

So you get your snazzy logo and try to upload it, you may see the following error.

Based on my experiences with VOC, the file size is limited to PNG or JPG <100 KB. It doesn’t seem to matter the actual image size, but rather the size of the file cannot be more that 100KB.

If you upload your file and find it fails, reduce the resolution of your file to get it below 100KB and try again. Once you have a file that is below 100KB, refresh the image form and upload the new file.

If you are a Microsoft Paint jockey and don’t have the tools to reduce image size, you can use an online image compression site lite tinyPNG.com to compress the image without significantly degrading the image quality.

Tweet about this on TwitterShare on FacebookShare on Google+

Tip #953: If Voice of the Customer installation fails

You try to install Voice of the Customer, but the installation fails repeatedly. What is going on?

You are doing it wrong.

Don’t just go to the Dynamics 365 instance picker, click solutions, and then install Voice of the Customer. First go to the Application tab of the instance picker, configure and approve the T&C’s for Voice of the Customer, then install the solution.

We warned you about this but you didn’t listen.

(those of you still posting about this in August).

Next time, pay attention 🙂


Tweet about this on TwitterShare on FacebookShare on Google+

Tip #952: Why you should create records from cross-entity search results

In Dynamics CRM 2015 or later we have cross entity search. This allows users to search across multiple entities and displays the results on a single screen. If you don’t find the record you want, you can hit the + button.

So when you are training users, should you train them to create new records from the view, from the quick create button, or the cross-entity search results page? I maintain that you should teach users to create from search results for two big reasons:

  1. It forces them to search before creating, which protects against creating duplicate records.
  2. When you click the + button on the search results, the new record form will prepend the words you searched for to the “name” field of the created record.

So if I search for CRM Tip of the Day and don’t get any results…

When I click the + button, the quick create form will already contain “CRM Tip of the Day” as the record name.

This will reinforce good data quality practices and save users time.

Tweet about this on TwitterShare on FacebookShare on Google+

Tip #951: Internal company contacts

You have people in your company who are not Dynamics users, will never use the system, and have no need to own records. However, you want to track those relationships and include them as activity parties or have them synchronize to your Exchange/Outlook contacts. What are the options?

  • Disabled users: Add a Dynamics 365 license to the user in Office 365, assign a security role to the user that includes activity permissions, then remove the license from the user in Office 365. The user will be a disabled user in Dynamics 365, and can be added as an activity party, but users will not synchronize to Exchange/Outlook contacts.
  • Create contacts for them: Create a company record for your company and add contact records for internal contacts. This will make non-users available to be added as activity parties, but then you will be faced with a conundrum: if you have workflows or other processes that send notifications to internal people, you will want the process to apply to both users and non-users, and you will probably want all internal contacts to sync to Outlook. So you will want to add all internal people, including active users, as contacts.

Challenges of maintaining user and contact records for the same people

Most implementations faced with this requirement will elect to create internal contacts, and that can be a workable solution.

In the “old days” (sometime early 2011), having a contact record and a user record that had the same email address caused big problems–Dynamics would resolve the email address of meeting attendees to the first match, which meant that if you had the same email address on a contact and a user, sometimes it would track and resolve against the contact rather than the user, so the meeting would disappear from users’ calendars, causing people to miss meetings.

Now this is no longer an issue–if a meeting is tracked in Outlook with the email address of a user that matches multiple additional records, the meeting attendee is now matched to all records that match. If you pull up a tracked appointment in CRM and see the same name repeated multiple times, this is what is happening. While this may appear unsightly from within the CRM web interface, it does not appear that way to external attendees or inside of Outlook.

So the main technical reason to not have users and contacts with the same email address is no longer an issue; however, you may still find some minor inconveniences from maintaining internal contacts for active users.

  • Creating activities from within the Dynamics web client, if you type a name that matches both a user and a contact, the user creating the record in CRM may inadvertently select the contact when they should select the user. If you are an executive assistant following tip 905to create appointments for your boss, if you type in “George Doubinski” and select the contact George rather than the user George, the appointment will not synchronize to George’s Exchange/Outlook calendar.
  • If your company religiously updates AD information to reflect email, address, and phone number changes, you may find the contact record for the user is outdated. Given that the contact record is what synchronizes to Outlook, not user records, people who use their Outlook contacts on their phone as the company directory may find themselves calling old phone numbers. This happened to me one time when Scott Sewell changed his phone number. The new owner of his old number was quite unhappy when I kept calling him.

A possible solution for this is to tie the internal contacts for active users to their user record. Add a custom lookup to the user record on the contact, and add a lookup for contact to the user that connects to the user’s contact record. when the user record is updated, update the contact record to reflect the updated information. This approach can also automate initial creation of user contacts–on create of a user record, if the contact lookup is blank, create a new contact, populate the user lookup on the contact with a link to the user, and update the contact lookup field on the user with the newly created contact record.

How do you solve the user/contact challenge for people at your company? Let us know in the comments.

Tweet about this on TwitterShare on FacebookShare on Google+