Tip #263: Avoid unnecessary plugin execution

Inspired by our rather radical approach to enforcing development discipline, Andre “I’ve got 88 in my handle” Margono decided to pick on another sinful habit in development, this time within plugin development.

Corporal punishment triggering behavior this time is to select all attributes as filtering attributes for Update message.
All attributes in Update plugin
Unfortunately, plugin registration tool that comes with CRM SDK encourages this behavior by automatically pre-selecting all attributes for new steps.

With the CRM 2013 auto-save functionality, imagine how many redundant plugin executions triggered if the list is not filtered (every 30 seconds or when navigates away from the current form).

To filter that list in Visual Studio Development Toolkit:
Filter the attributes in Visual Studio
or in the plugin registration tool:
Select filtering attributes in plugin registration tool
With the list restricted to the attributes your plugin cares about, the code will only be executed when any of these attributes are changed.

Tip #262: Deeper Lync Integration

You probably know about the Dynamics CRM Lync integration that allows you to see presence notification for contacts and users and allows you to click on a phone number to initiate a Lync call. But there are also additional integration points that are possible if you also use CRM for Outlook:

  • Conversation tracking: Whenever you have a Lync conversation, your conversation history is stored in a folder in Outlook. These conversations can be tracked just like emails.
  • Voicemail tracking: If you have the voicemail/missed call notifications sent to your email, these can also be tracked. There was a bug affecting deployments using the email router to track incoming messages where the tracking of voice mails no longer worked after upgrading to Exchange 2013. This is fixed in CRM 2011 UR 16 and CRM 2013 UR 3.

Tip #261: Deleted tasks

If you use CRM for Outlook and synchronize tasks with Outlook from CRM, what happens when a user deletes a task in Outlook?

  • If the user is the owner and the task is not completed, the task is deleted from CRM when the task is deleted in Outlook.
  • If the user is the owner and the task is completed, the task is not deleted from CRM when the task is deleted in Outlook.

This means that your users may actually be doing the task and deleting it from their Outlook task list, which will make the task get deleted in CRM. My experience is that many people delete the task from the Outlook task list rather than “completing” it, because the task list looks untidy with a bunch of crossed out tasks on it.

This becomes an issue if you are using activity completion to gauge user adoption or want to preserve the history of tasks in CRM. If you are incentivizing your employees based on task completion, and the tasks are being deleted in CRM by the user deleting the task from his Outlook task list, your reports may be incorrect.

Train users to always complete tasks, and if it remains a problem, consider removing “delete” privileges for activities.

Tip #260: Globally manage user settings in CRM

In Dynamics CRM, settings like default currency, number of records per page of view, and email tracking options are stored in the MSCRM database as user settings. This means that a user manages these settings. There are supported ways of updating these settings via the SDK, but Microsoft does not provide a UI for administrators to change these settings for all users.

Tanguy Touzard has recently added a tool to his amazing XRM Toolbox called “User Settings Manager” that allows a System Administrator to easily manage and update user settings for all users.

Screenshot 2014-11-06 08.59.31

I can select one or more users, update the setting on the right, then hit “Update user settings” to apply the settings. Now that I can control user settings and sync filters globally, the XRM toolbox is my go-to tool for CRM user administration.

 

Tip #259: Upload files to CRM from OneDrive, DropBox or Google Drive

I love the availability of vast amounts of low-cost online storage these days. Microsoft just bumped up my OneDrive to unlimited space, and DropBox is giving me one TB. This means that I can get whatever files I need from almost any device.

So if you use a cloud provider as your primary storage medium, how do you attach these files to CRM?

If you use an Android device, files from your cloud storage can be attached to CRM records.

  1. Open CRM in Chrome browser
  2. Add a note/attachment and click “browse.”
  3. If you have the app for OneDrive, Google Drive, or DropBox installed on your device, the file system allows you to select a file stored on the cloud as an attachment in CRM, just like if the file was on your local storage.

attachment

Based on my tests, this also supports just about any file format, making the attachment process very similar to a PC.

If you have an iPhone or iPad, you can attach any file you want, as long as it is a photograph stored on your device camera roll.

.

 

 

 

Tip #258: Say ‘negative’ to negative entitlements

If you started to explore enhancements to customer service functionality that came with 2013 SP1/Spring 2014 release, you know that entitlements can be an interesting and challenging beast to deal with. For example, consider a situation when allocation type is set to number of cases and you decrease remaining terms on case resolution. Nothing in the system would stop you from creating more cases than you have remaining terms and then resolve all those cases potentially ending with this:
Negative entitlement terms

Some people are unfazed by negative entitlements, I personally feel that they are akin account overdraft: handy but indicate a serious problem and should be avoided like a plague. These bankrupting circumstances can be easily circumvented with a simple real-time workflow:

  1. Create a real-time workflow for the case entity and trigger it after the case status changes
  2. Set condition to verify remaining terms on the entitlement if appropriate:
    Check remaining entitlement terms
  3. In the best tradition of the cancelled workflows, set the dynamic error message:
    Dynamic error message
  4. Enjoy the fruit when user tries to close a case on the entitlement without any terms left:
    Unable to close the case

Tip #257: Prevent Export To Excel By Entity

If you want to totally remove the ability of CRM users to “Export to Excel,” you can remove the permission on the Business Management tab of the security role definition.

Privacy settings

This is good if you don’t want anybody exporting to Excel. But what if you don’t want to remove all Export to Excel, just remove it from certain entities?

You can do that with the help of the Ribbon Workbench. Create a solution including the entities from which you wish to remove the Excel button and open the solution in the Ribbon workbench. By hiding the export button on the “Home” command bar, you will remove it from any views for the entity, and if you hide it on the subgrid command bar, you will remove it from subgrids and Advanced Find results.

Now users will not have an option to export to Excel from that entity.

Note–this is not foolproof. There are still other ways that data can be exported to Excel and other formats. Any SSRS reports can be exported, and if the user has access to Excel Power BI, they could us it to extract data that way. Also, if they can export data from entities parented by the entity that you are excluding, the user can add columns from the parent record and export those views. This tip simply gives you a way to make the extraction of data more difficult for users. We recommend hiring people that you can trust, and if you can’t trust them, totally disabling export to Excel may be the best option.

Thanks for Scott Durow for being awesome, building a great tool, and providing advice on this tip.

 

Tip #256: Painless field replacement

You have a field that you wish was a different data type. For example, you have an option set that you wish was a lookup field. Maybe the values in this list change frequently, and you want to have someone who is not a System Administrator be able to add/modify values in the list.

But what about all of the existing records that have data in the option set? You don’t want to just delete old the field, as the existing values will be lost. And you can’t just change the data type of a field.

Using the following procedure, you can replace a field fairly quickly, and keep the data from that field.

  1. Add your new field. In this example, add a custom entity for your lookup list, then add the lookup field to the desired entity.
  2. Add the values to the lookup table and set security permissions so that users have view and append permissions to the entity so they can select values in the new lookup field.
  3. Using advanced find, create a view that includes the old field and the new field side-by side. Export this view to Excel, being sure to check the “for re-import” checkbox.
  4. Edit the spreadsheet, populating the new field with the appropriate values that correspond to the old field values.
  5. Import the spreadsheet.

At this point, the existing records will contain data in the new field.

6. Update existing views, forms, and workflows to replace references to the old field with the new one. One way to find all dependencies is to select the field in customization, click more actions, and then “show dependencies.”.

Once you have replaced the field in all dependencies, you can delete the old field.

Tip #255: Have some cake

Happy BirthdayOne year ago, we published our first tip, “don’t use Salesforce.” For an entire year, we have had a tip every weekday with some breaks for statutory holidays. This is a good excuse to eat cake. But really, who needs an excuse to eat cake?

Speaking of birthdays, I was recently asked about birthdays showing up on the Outlook calendar after installing CRM for Outlook. Why does this happen, and how do you make it stop?

First of all, CRM does not directly sync birthdays to your calendar. This is standard Outlook functionality (also happens in the iPhone calendar). Any contacts with birthdays show up on the calendar. By syncing contact records to Exchange, if there is a value in the birthday field, it will show up on the calendar.

If you don’t want this to happen, consider storing birthdays in a custom field on the contact. This will prevent them from synchronizing to Outlook, and they won’t show up on your calendar. CRM 2015 also adds configurable sync pipe between CRM and Exchange, which will allow you to set the birthday field not to sync to your Outlook contacts.

Or, just leave this feature on and call all of your contacts and tell them “Happy Birthday!” And have a piece of cake in their honor.

Like we just did – with exactly 255 posts we just took our first byte.

Tip #254: Update fields on disabled records

I got an email from a CRM administrator who needed to update a field on a disabled user record; however, he was not an Office 365 admin, so he could not re-enable the user to make the change. Was there any way to update a field on a disabled user without having to re-enable the user?

There is a little trick that can update just about any field on just about any disabled/inactive record without having to first re-activate the record.

1. Using advanced find, build a view containing just the records that you wish to update and including the fields that you need to update.

2. Export to Excel, being sure to check the box to make the data available for re-import.

Screenshot 2014-10-29 16.17.24

3. Update the values you wish to change in the spreadsheet.

4. Import the updated xml spreadsheet in via the import utility.

When the import finishes, you should see the changes in the deactivated record.

In some cases, you may be better off activating and changing the record, but with some record types, like opportunities, this can have a down side of messing up the opportunity close data, or with users, requiring someone with Office 365 admin privileges to add a license to the user and waiting for it to synchronize with CRM. In those scenarios, this approach will be faster.