Tip #933: When a field is not a field

Here’s a Dynamics riddle for you: When is a field not a field? Answer: when it is 2 or more fields.

Way back in tip 273, we discussed the maximum number of fields you can have in a Dynamics 365 entity. That maximum is for text/string fields. You should be aware that certain types of fields will consume more than one field in the database, reducing the limit on total fields. (To clarify: 1,024 columns per table is one of the limits imposed by SQL Server).

Adam Vero clarifies:

  • Option sets and two options (bit fields) each use 2 columns, regardless of how many possible options.
  • Lookups are also two – the GUID and name.
  • Polymorphic lookups like customer and regarding may use an extra one for the target entity type.
  • Currency fields will also be two each, plus 3 overall on the entity for the exchange rate and currency ID and name.
  • Rollup fields of any kind, because these will add two additional fields for the current status of the rollup field and the date/time it was last calculated

Tipp Jaar: The rollup currency field where it’s the only currency field on the entity takes the cake with 8 fields being consumed in the process.

Tip #932: If a garage was like Dynamics 365

This recent Facebook discussion illustrates what would happen if common CRM support methods were applied to other areas of life..

When you are looking for help with Dynamics 365 or with your garage door, clearly state the issue and the steps to reproduce the problem. Let’s see what advice the Dynamics community has for this issue.

Tipp Jaar: Sounds very familiar. Use Edge as your Dynamics 365 browser, except when performing any form customizations, then use Firefox for that. Ah, yes, and Chrome for script debugging.



Tipp Jaar: Yes, next release will fix that one, for sure! What do you mean, you have to use your Dynamics 365 in the meantime?


Tipp Jaar: Secure the social security number field? Easy – apply javascript to hide it. Javascript is fast, typical user won’t be able to read the number before it disappears from the screen.


Tipp Jaar: Users discovered that pressing F12 gives them access to all fields hidden by javascript


Tipp Jaar: Wrong base currency? Reprovision the entire Dynamics 365 organization


Tipp Jaar: That’s right, fill in your Dynamics 365 with junk so that the users give up and go back to the Excel spreadsheets. You can still use Dynamics organization for prototyping and training.

So the lesson is don’t trust the Dynamics community with home improvement suggestions.

Tip #931: Too Few Business Units

Organizational charts updateIn Tip 917 we talked about what happens if you have too many business units in Dynamics 365. But what about the opposite — can you have too few business units?

If you are implementing Dynamics for a single group, it is common to only use the base business unit for all users. “We don’t have any secrets, let’s keep it simple.”

While I agree and encourage the “keep it simple” approach, there is a strong possibility that you may at some point have some things that you want to keep secret from a subset of the users. Consider the following scenarios:

  • You grow Dynamics usage to other parts of the company
  • Your company gets acquired by a large multi-national company
  • The CEO decides that he wants to track emails and doesn’t want everybody to read them
  • The VP of sales discovers that there are number of contacts in her address book that need to be in Dynamics but better kept private from the rest of the crew

As discussed in 917, moving people between business units is painful, and you will want to only do it whenever necessary. If you start with all users in the base business unit, if a change comes along that requires a subset of data to be separate, you may find yourself having to relocate many or all of the existing users, as the base business unit cannot be reparented.

To guard against this eventuality, it may be a good idea to initially create one child business unit and put all users in that business unit. Should your business change to require further segmentation of data, this will simplify those changes, as the business unit with the bulk of the users can be reparented, or select users, like the CEO, can be moved to the base business unit. You will avoid full-scale business unit moves of all users.

Tip #930: Important changes to the Voice of the Customer installation process

A new version of the Voice of the Customer solution was recently released (v.9). The new solutions introduces some changes in the way the solution authenticates with CRM to improve security.

  1. To start the installation of the solution, the admin should log in to the Dynamics 365 Administration Center portal in Office 365.
  2. In the Administration Center portal, click on the Applications tab
  3.  Select “Voice of the Customer” application and click on the manage icon which launches the Voice of the Customer installation page.

Please note that you must be a tenant admin to complete this installation.

 

Tip #929: Why leading wildcard is not default

Our original wildcard tip has generated some interest and I thought that this very good question from Chase deserves a separate post rather than an inline reply:

I do not understand why this isn’t a native action of searching.

There are multiple reasons why leading wildcard is not a default.

  • I often use “what would SQL Server do” approach when thinking about how Dynamics 365 deals with the records. When you put your SQL Server hat on, you’ll find that leading wildcard search is “expensive” and ineffective.
  • If it was on by default, how would you switch it off? For example, how would you search for customers with the last name “Lee” without also finding “Sleek” or “Branleegate”?
  • Lastly, you already have a leading wildcard when you use Contains operator in Advanced Find

To continue Chase’s question:

How do I setup the search bar to always search as if I have put an asterisk in front of my search? I’m thinking maybe there is an inspect element change I could complete that would do this?

I don’t believe it’s possible without unsupported customizations and it’s better to empower users by teaching them to judiciously use “*” as part of their search term instead.

Tip #928: When CRM monthly charts won’t render

In Dynamics 365/CRM on premises, if you create a chart and group by month and find that it doesn’t render, you may need some additional SQL permissions.

With these settings in place, your monthly grouped charts should render correctly.

Tip #927: Duplicates when merging

When you merge two records you may receive the following cryptic message:

A record that has the attribute value {1} already exists. The entity key {0} requires that this set of attributes contains unique values. Select unique values and try again

What? Select where? That’s really confusing because the merge process is supposed to ignore the duplicates because one of the records is being deactivated.

Lucky for us, it’s not a generic SQL error and the answer is the mentioning of the entity key in the message. It refers to an alternate key that exists on the record. When alternate key is present, the unique index is created by SQL Server and that index trumps any business layer rules and duplicate detections that Dynamics 365 might have in place.

Effectively, you will receive the above message when you’ve selected the alternate key value from the subordinate record and are trying to merge it into the master record. Subordinate record will be deactivated but the value of the alternate key still there (and in the index) so any attempt to add the same value in the master record breaks the merge process.

Solutions:

  • Manually remove the value from the alternate key from the subordinate record and add it to the master.
  • “Swap” master and subordinate and merge into the record that contains the correct key value.

 

Tip #926: How to find space

We did talk about wildcards and using some unorthodox search techniques before. But today’s tip is not a revision but rather an extension.

In one of the projects we had the need to find all contacts whose last names contain spaces (if you must know, that’s because last names were used as a base for a subdomain). Trying obvious “Last Name Contains <space>” condition immediately gives you “Provide a valid value for Last Name”. Dynamics 365, just like the nature, abhors a vacuum.

Wildcards to the rescue – enter the condition as “Last Name Contains * *” and Dynamics 365 oblidges.

For example, let’s find all last names with not one but two spaces! “Last Name Contains * * *” should get you the results:
Find last name with two spaces
 

Tip #925: Mobile attachments revisited

As we approach the elusive tip 1,000, we are updating some of our tips from the past. In this tip, we will re-evaluate tip 259 regarding attaching files to Dynamics CRM via a mobile device. 

The takeaway from tip 259 was that if you used Android, you could attach files from the leading web file storage apps in CRM, but if you used iOS, “you can attach any file you want, as long as it is a photograph stored on your device camera roll.”

So what has changed?

If you open the Dynamics 365 mobile app on an iPad and create a note, you will see that it still only gives you the option to attach a photo. However, thanks to advances in the iOS platform, we now have a supported way to add other types of files from an iPad:

  1. Click “more” and “open in browser”
  2. Tap the “enter a note” box on the notes tab of the social pane and tap the “attach” button
  3. You will have the option to select a photo or files from any web storage app, such a OneDrive, Dropbox, or Google Drive.

While still not perfect (or addressing attaching files from phones), it is better than it was 3 years ago. Let’s see what happens when iOS 11 brings a file system to iOS.

 

Tip #924: Removing the dashboard advanced find button

In Dynamics 365, Microsoft moved the Advanced Find button to a standard location on the upper right corner of the screen. If you upgrade your configuration from CRM 2016 to Dynamics 365, you will see that the old “Advanced Find” button still appears on CRM Dashboard ribbons. In new environments, this button will not be there.

This is an issue because it may confuse users, and we have also seen that in some environments, this legacy button is no longer functional. So you will want to hide the button.

The best way to do this is using the Ribbon Workbench.

  1. Create a solution in CRM, add the application ribbons to the solution (Add existing>>Application Ribbons).
  2. Open the solution in the Ribbon Workbench.
  3. From the main ribbon, scroll right and find the MSCRM.DashboardTab group.
  4. Right click on the Advanced Find button on the ribbon and select hide.
  5. In the Ribbon Workbench publish your changes.