Tip #489: Limitations of Retrieve plugins

Calculated fields is one of the best new features and is indispensable for simple calculations. Keyword here is simple. Range of functions available in calculated fields is limited (though it continues to expand from release to release).

One of the “traditional” methods to add calculated field is to add a simple field and then create plugin on Retrieve and RetrieveMultiple messages. If field is part of the column list in either message, perform your voodoo and return the calculated value.

Smug developer that I am, that’s what I’ve done and reported to the customer. Who was rather disappointed with the result, as it turned out. Field was calculating fine but yielded very strange results when customer tried to build some charts using that field.

Humiliated, I’m happy to report that the following functionality won’t work for the fields calculated in Retrieve and RetrieveMultiple plugins:

  • Sorting on the column in the listviews
  • Using the column as aggregate value in charts

Come to think about it, that makes perfect sense. Sorting and aggregation is done as part of the T-SQL statement that runs on the SQL Server that has absolutely no clue about your plugin magic. As long as you and your customers are aware of these limitations, using plugins for calculations “on-the-fly” is perfectly fine.

Tip #488: Tipster guide to Dynamics USD Hosted Controls

It’s Friday and another good day for both USDs, US dollar and Unified Service Desk.

In this video, we introduce you to the fundamental building blocks of USD – Hosted Controls. We talk about what they are and how to use them in the USD platform. We explore some of the different Hosted Control types and how they are created.

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.

Tip #487: Why can’t I set the default dashboard?

Got a question this morning: “Why can’t I set my default dashboard in CRM 2015 like I could in CRM 2011?”

First of all, you can set your default dashboard, if you are in your “home” sitemap area. So if your default sitemap area is “Sales,” you will be able to set the default when you click the dashboard link in the “Sales” area. However, if you go to the marketing area, you will see the dashboard specified in the sitemap for the marketing area.

This gives you the ability to have your own default dashboard when you are “home,” but have group specific dashboards when traveling to other areas.

Want an easy way to manage user’s default site map area (and other user settings)? I recommend the user settings utility in the XRM Toolbox.

Tip #486: Don’t hard code currency in workflows

If you have a workflow dealing with the entities that include money fields, avoid setting explicit currency. Instead, try to infer the currency from the related records.

Bad currency workflowGood currency workflow

For mere mortals, it’s just a bad practice, for ISVs, it’s definitely a case of spießrutenlaufen.

Why? Because if you activate your workflow and add it to a solution, then importing your solution to any CRM organization that does not use MMDDYYYY as their date format (and therefore will opt for their own currency), will complete with the warnings and the workflow on the target system will be deactivated.

Solution import warning
US currency problem

Tip #485: And inactive sneaks in

All entities in CRM have status and status reason fields. Status is either Active or Inactive (system entities, in fact, can have more than that but that’s not the subject of this tip), while status reason can hold multiple customizable values for each status. For example, if we have a custom entity Project, we’d want to specify the reason why the project was deactivated:

Project status reason

Since forever we’ve been using the behavior of these fields where, if Inactive status has more than one value, CRM would prompt users to select the status reason when deactivating the records:

Status reason prompt on deactivation

However, CRM Online 2015 Update seems to have changed the behavior. In the list view it continues to prompt users to select the status reason; in the form view it silently deactivates the record without any prompts. Some say “behavior”, I call a bug. Build 7.1.1.3138 to blame (YMMV). The only quick workaround that come to mind is to remove Deactivate from the command bar and tell users to use a list view for a time being.

Tip #484: Don’t Clutter your CRM queue mailboxes

In tip 395 I made reference to the new office 365 Clutter feature. This feature uses machine learning to separate out “graymail,” such as email subscriptions and advertisements that you opted in to. I found it does a great job on my personal inbox, with very few false positives.

Recently, however, we found that emails that our clients were sending to one of our queue email addresses were not making it into CRM. Unbeknownst to us, the clutter feature was turned on in the mailbox used by the queue. As a result, many client emails were moved to the clutter folder and did not get picked up by CRM.

See instructions for turning Clutter off on a mailbox. Also, you can hear us discuss this experience on episode 9 of CRM Audio.

Tip #483: Tipster guide to CRM themes

Barbie palette sampleFeels like Friday today and that means new video from our underground lab.

“Your CRM is boring!” Not anymore! Would you like your CRM to take on Barbie palette? No problem!

In this video we walk you though the new theming feature that was release as part of the spring update 2015, which means CRM Online only (not for long).

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.

Tip #482: Server Sync is required for the Outlook Preview App

If you enable the Outlook preview app, when you click “Dynamics CRM” in Outlook, you may see the following error:

error

But wait, you say, I do have my mailbox configured for server synchronization for incoming emails!

The secret is, you also have to have server sync enabled on your mailbox for outgoing email as well as contacts, appointments and tasks. If any of the three are not server synchronization enabled, it will not work.

For more details on setting up the CRM App for Outlook, see Tip #458: Tipster’s guide to CRM app for Outlook.

Tip #481: Mobile App Troubleshooting Part 2

Yesterday I posted a tip about Mobile App Troubleshooting regarding duplicate views creating an error message in the mobile app. Today I would like to add to that with an issue that we experienced while doing the original troubleshooting. It is one of the Duh! moments where as soon as you know what to do to fix it, the fix is so obvious you want to slap your forehead.

What we ran into was that certain dashboards weren’t displaying. The name of the dashboard was appearing but there wan’t any visualization on the screen.

What is the Duh! moment? If you have a visualizations that is set to display in the mobile app, then any of the entities that are referenced in the chart must also be pushed to the mobile app. In this case the custom entity for Properties had it’s prescence in the app turned off in CRM. Once we went into CRM customizations, checked the mobile app box and published we were on our way to success. Success was totally realized once we downloaded the updated configuration into the phone.

So the challenge for us was, while we wanted to display the chart in the mobile app, users didn’t really need the property entity on their phones, but there was no getting around it.

Visualization missing the Chart

Visualization missing the Chart

Visualization with Chart after adding required entity

Visualization with Chart after adding required entity

Tip #480: Mobile App Troubleshooting

Recently we ran into a vexing issue with the use of the Dynamics CRM (for phone) app. The error was occurring on all three platforms we tested – Windows Phone, Windows Desktop and Android phone. We connected the application to another organization and didn’t see the error. So we concluded it must have been something with the specific org.

Our troubleshooting process was as follows:

  1. We removed all the entities from the app – go to CRM Customizations and then to go each entity that you see listed in the app menu, uncheck the mobile app box, save and then do the next entity.
  2. Publish all the Customizations.
  3. Restart the phone.
  4. Launch the app. Does the error appear? If no then proceed, if yes then this tip won’t help. 🙁
  5. Go back into CRM and select one entity, check the mobile box and publish this entity ( we started with the custom entities because we figured they would be the likely culprit )
  6. Go back to Step 3, keep looping through one by one until you get the error. For grins we then went back and removed the Opportunity entity, published again and then rebooted the phone and the error was gone.
  7. Now comes the fun part. In our case it turned out that there were two views for the Opportunity entity that were set as Default Public Views. While the browser may be able to deal with it, the mobile app throws an error. After cleaning up the condition by editing the solution XML file we then checked the mobile app box, published and rebooted the phone. The mobile app worked fine.

PS. I will have a tip later this week about an error with dashboards we observed while doing the above testing.