Tip #789: Disappearing Synchronized Contacts

Yesterday I set up CRM for Outlook. My contact synchronization rule is set to get all active contacts (about 4,000), and yesterday they were all there, now today there are only about 600. I use Outlook synchronization. What should I do?

Alien abductionWhenever I see weird contact synchronization behavior, such as contacts not synchronizing or synchronized contacts disappearing from outlook, the following is what I try:

First thing I would check out is does you have multiple computers configured to be the sync client. Outlook synchronization is only supposed to allow one client to be the synchronizing client, but I’ve noticed with recent versions of CRM for Outlook, if I configure my Surface to crm, shut it off, and then configure another computer, it does not always turn off synchronization on the original computer. I recommend reconfiguring outlook client on all of his computers.

Another possibility is you have CRM for Outlook configured on another computer synchronizing your production Exchange mailbox with a non production CRM environment. That could be synchronizing and wiping out the synchronized contacts from production. Reconfiguring all outlook clients would help with this too.

Finally, Outlook client maintains a local table of deleted contacts. With outlook synchronization, if you delete a contact from Outlook, it won’t synchronize that contact again. Reconfiguring the Outlook client will make deleted contacts come back. It will also duplicate any already synchronize contacts, so that’s a pain.

This is one of the reasons to consider server-side sync so that the contact synchronization isn’t impacted by computer changes. Most of the times that I see weird flaky contact synchronization behavior, it is usually Outlook synchronization. Even if you get to work right, the next time you reconfigure or upgrade the client, it’s going to duplicate contacts with Outlook synchronization. Go server side sync.

Tip #788: Video Guide to Dynamics 365 Business Rule Changes

Rule changesIn this Video we look at the new options available with Business Rules in the application. Not only does this include the updated editor, but we also look at the new Recommendation Action that is available.

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!

Tip #787: Creating records in Project Service

Dictionary keyWhen creating records for one of the Dynamics 365 solutions, you may find yourself in the same situation as Guido “Trekkie not Star Wars fan” Preite. The simplest possible code to create msdyn_actual (part of the Project Service)

Entity foobar = new Entity("msdyn_actual");
foobar["msdyn_description"] = "MY TEST";
service.Create(foobar);

generates “The given key was not present in the dictionary” error.

One of the advantages (and curses) of coding CRUD operations is that any attribute can be ignored even if marked as business required. However, most of the complex solutions include their own plugins that reasonably expect mandatory attributes to be present – hence the error (as generated by one of the Project Services plugins).

Solution is to use metadata browser (either from XrmToolbox or SDK) to figure out required attributes. In the case of msdyn_actual entity they are:

  • msdyn_documentdate
  • msdyn_startdatetime
  • msdyn_enddatetime
  • msdyn_transactiontypecode
  • msdyn_transactionclassification

(Interestingly enough, msdyn_description, primary name, is not required)

Entity foobar = new Entity("msdyn_actual");
foobar["msdyn_description"] = "MY TEST";

foobar["msdyn_transactiontypecode"] = 
   new OptionSetValue(192350000); // Cost

foobar["msdyn_transactionclassification"] = 
   new OptionSetValue(192350000); // Time

service.Create(foobar);

We did not use all required attributes but looks like only the type code and classification are explicitly expected and used by the built-in plugins.

Tip #786: Delete vs reset for Dynamics 365 instances

Format diskIn Dynamics 365 admin center, you can Reset a sandbox instance – this deletes the current instance and provisions a new one in its place, essentially returning it to the factory conditions. However, any provisioned organization in Dynamics 365 consumes storage – about 180MB for empty Dynamics 365 organization without any sample data or trial solutions.

Service health - storage consumption

Reset deleteIf you would like to put your instance on hold and avoid using those precious kilobytes, use Delete operation. Despite the scary name, the action is very similar to a reset except that, after wiping your organization clean, the system will not provision anything at all. Rest assured, your entitlement to the sandbox instance is safe (though it might take a few minutes for your entitlement to appear) and you will be able to provision a fresh org when needed – your entitlement will show up as an instance without any name with the state Instance to configure.

Note: unlike reset, delete operation will also destroy any backups you had for the sandbox instance so use it with caution.

No instance

Destructive operations like reset/delete are not allowed on production instances, so that admins do not reset their production environment by mistake. If you really need to reset a production instance, you would first need to change the instance type to a sandbox and then you’ll be able to do the operation. After the reset is complete, you could change the instance type to production if needed.

Tip #785: How to restore USD session

RestoreThis question frequently comes up during the USD (Unified Service Desk, not $) projects and training sessions: what is the most effective way to save/restore the entire USD session? This functionality would enable some interesting scenarios, e.g. transfer the entire session from one user to another with the call transfer, or simply save a complicated session in the end of the day and to be able to quickly resume it the following morning.

Thanks to Jayme Pechan for helping with the outline of the solution and hats off to Neil “USD Greasemonkey” Parkhurst for putting together the step-by-step guide.

This is the process in a nutshell

  1. Create a custom save/restore/transfer entity where you can store data for session.
  2. To save the session, create an action call to the CRM Global Manager’s CreateEntity action. In this action, you will want to populate the transfer entity custom fields with values that are needed to restore the various components.
    1. For the Agent Scripting component, the Replacement parameter list has the task name. During the restore, you will call GotoTask with this name to restore the location. So in the CreateEntity, place this name in one of your customer fields.
    2. For web controls, a URL is captured for this purpose.
    3. Most other [well-designed] hosted controls would automatically pick up their state when these URL’s and Agent script are populated so you don’t really to do anything else. For example, the Session Overview will get it’s data from the replacement parameters, once the URL’s restore so we don’t need to pass anything for these.
  3. Now that you have a created transfer entity and it’s corresponding ID, you can pass this ID with the phone call. Typically you use the UII parameter or various CTI fields that map to this.
  4. Now create a CTI Window Navigation Rule. This rule will handle restoring the session when it recognizes this transfer guid in the UII field.

One of the benefits from making this transfer entity an actual activity is that we could set the RegardingObjectId to the phonecall or activity that was being transferred. It would then count the number of times the activity was transferred, which is a useful metric for customer service. Also, you can place these activities into a queue as well for an offline transfer. For example, you can add an escalate button in USD that does this save and places the activity into a supervisor queue. The agent would then notify the caller that they will receive a callback. The supervisor then looks at their queue, double clicks on the transfer item and instead of displaying it, your popup window navigation rule in USD can run the same action call sequence to do the restore in USD. They could then, of course, click the number and call the customer back.

Sounds easy, right? Well, not quite, but luckily Neil has it covered.

Tip #784: Some finesse in portal cache resets

FlamethrowerNot so long ago we tipped about flushing your portal cache. The main advice is still valid:

Do not use cache invalidation handle

This method no longer works in online portals, and is now obsolete.

Turning your portal off and then back on still works but it’s like using a flamethrower to kill a mosquito. It takes few minutes to accomplish the task and it disrupts the availability of your portal.

Good news is there are better methods now.

  • In a recent update to online service you will now see a reset portal button, which will automate the stop/start the portal for you, invalidating the entire cache.
  • Updating the website record in CRM, ie change the name field will also do the job. Note: this is not a formal mechanism because it was added as a temporary measure, and the development team reserves the right to remove this behavior in the future.
  • Publishing all customizations in CRM will also invalidate the portal cache.

The above methods are effective but drop the entire cache indiscriminately. Much better and recommended approach is to ensure that “Change tracking” is enabled for the entities used in the portal.

Change tracking for an entity

If this option is enabled, you don’t have to do any of these tricks to clear up cache. Portals use change tracking feature to intelligently refresh the portal cache for a specific entity without resorting to a big hammer.

Thanks to Tanguy “The XRM Toolbox” Touzard and Shan “Smoke ’em” McArthur for beating the issue into a pulp.

Tip #783: Video Guide to Dynamics 365 Visual Business Process Flow Editor

FlowchartsIn this video we look at new updated Business Process Visual Editor that is included in Dynamics 365. We look at how things are laid out, as well as some of the new options that are available as part of the editor.

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!

Tip #782: Hyperlink from PowerBI to Dynamics 365

Have you ever wished you could link from a table row in Power BI to over to Dynamics CRM – allowing users to filter and view the records in a grid or matrix in PowerBI and when they want more detail, they can click to open the corresponding record CRM?

Wish granted!

To begin: ensure you’ve added the entity’s primary id (GUID) to the dataset for the entity you want to build the hyperlink for.

Add a new column in the entity using this formula as a template:

Opportunity Link = “https://yourorganization.crm.dynamics.com/CRMReports/viewer/drillopen.aspx?ID={” & Opportunities[OpportunityId] & “}&LogicalName=opportunity

tip-of-the-day-hyperlink-from-powerbi-to-crm

  1. Give the link a name (in this case it’s to the opportunity table, so I’ve named it ‘Opportunity Link’)
  2. Change the first part of the URL (up to the /CRMReports portion) to match the URL for your CRM organization.
  3. Opportunities[opportunityid] is the reference to the recordid field (guid) in the “opportunities” table
  4. Replace ‘opportunity‘ with the schema (logical) name of the entity from CRM.
  5. Select this new column and on the ‘Modeling’ tab, change the ‘Data Category’ to Web URL.
  6. Bonus tip thanks to @CRMChartGuy – On the Formatting tab of the entity, expand the ‘Values’ area and change the ‘URL icon’ setting to “On” – This will change the URL to an icon that looks like a couple of links of a chain. – nice!

Enjoy!

Tip #781: Where are my folders?

So you want to use folder tracking, but when you go to “Configure Folder Tracking Rules,” you don’t see any of your folders.

Check your security role–on the “Business Management” tab, verify that the role has user-level create, read, write, delete, and append privilege for “Mailbox Auto Tracking Folder.”

tracking-mailbox

Also, verify that folder tracking has been enabled for your organization. Go to settings–> Email Configuration–> Email Configuration Settings. Check the box to use folder-level tracking for Exchange Folders under the Configure folder-level tracking and email correlation section.

email-settings

 

Tip #780: When trial is “sorry, that didn’t work”

During the provisioning of new Dynamics 365 trial you may find yourself in the situation when provisioning process does not complete and you receive the “Sorry, that didn’t work” error message:

Sorry that didn't work

Fubar symptoms include:

  • Office portal works just fine
  • CRM trial is actually provisioned and can be found under Billing > Subscriptions
  • No CRM licenses assigned even to the global administrator
  • https://yourorg.crm.dynamics.com URL does not resolve

To push CRM trial to completion, type or copypaste the following URL into your browser: https://port.crm.dynamics.com/G/setup/index.aspx. At this point you’ll be presented with the Dynamics 365 trial provisioning screen that allows you to select Sales, Customer Service, or none of the above, with Field Service and Project Service coming soon.

Notes:

  • The above URL is for US, different regions will have https://port.crmX.dynamics.com/G/setup/index.aspx with 9 <= X < 1.
  • If you provision Office 365 trial first, add Dynamics 365 trial to it, and get stuck, the steps above still work but DNS may not resolve. Edit the instance and change the instance URL by hands should fix that one.