Microsoft Dynamics 365 for Outlook is unable to render entity views (web pages)

After installing the August 2018 Office update, we are struggling with the error message “Waiting for a page to be retrieved from a Microsoft Dynamics 365 server…” when using Microsoft Dynamics 365 for outlook app.

Solution

As a workaround while this issue is under investigation, navigate to the following location within Outlook:

File -> Options -> General -> User Interface Options -> When using multiple displays

Change the value of this setting to “Optimize for compatibility” (it will also notify you an application restart is required).

Outlook Multi-monitor optimization

Once Outlook is restarted, the webpages within the Microsoft Dynamics 365 for Outlook will be able to render webpages again. 

This can also be enforced through GPO via the following registry location (ensure to restart Outlook if running while this is set):

[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Office\16.0\Outlook] “ForceLegacyDpiAwarenessMode”=dword:00000001 

View Designer plugin in XrmToolBox

In one of my previous post I explained how to apply “OR” condition for the filters that are split between the two entities, however, these type of conditions were not possible to apply for views in MS CRM. But, now we have a new plugin called “ViewDesigner” introduced in our favorite XrmToolBox where you can apply whatever filter you want to the existing views in CRM.  Here is the link to know full advantages and usage of this plugin.

https://stoneridgesoftware.com/going-beyond-advanced-find-views-and-xrmtoolbox-view-designer-fetchxml-builder/

Hope it makes easier the developer effort !!!

Restrict contact deletion on account delete

As per the OOB functionality all the child records of account like contacts, opportunities and activities etc., will be deleted on delete of account. But, in one of my project we got a requirement to remove the link with contacts instead of delete. I tried to customize the relationship but the CRM is not allowing us to do this.

2018-11-05_1514

Finally we ended up with writing the plugin to achieve this. We have to write this plugin on “Pre Validation” stage of “Delete” step on Account entity. The child records were not available in any other steps (Pre Operation for ex) as the CRM platform deletes all the child records first and then account. The following is the plugin code.


IPluginExecutionContext pluginContext = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService organizationService = serviceFactory.CreateOrganizationService(pluginContext.UserId);
EntityReference targetEntity = (EntityReference)pluginContext.InputParameters["Target"];

QueryExpression getContacts = new QueryExpression("contact");
getContacts.Criteria.AddCondition(new ConditionExpression("parentcustomerid", ConditionOperator.Equal, targetEntity.Id));
EntityCollection allContacts = organizationService.RetrieveMultiple(getContacts);
foreach(Entity contact in allContacts.Entities)
{
Entity contactToBeUpdated = new Entity("contact");
contactToBeUpdated.Id = contact.Id;
contactToBeUpdated.Attributes["parentcustomerid"] = null;
organizationService.Update(contactToBeUpdated);
}

Happy coding !!!

Use visual controls + calculated fields to create an in-form dashboard

Want to add some sizzle to you form configuration? Phil Dudovicz recommends using visual controls with calculated fields to create a nice looking dashboard in your Dynamics 365 Unified Interface form. The following is an example of an investor form that visually displays relevant investor data.

Let’s take a closer look at how this is built:

  1. Current Year return

  • Calculated Field
  • Data Type: Decimal Number
  • Field Type: Calculated
  • ((new_investmentvalue – new_investmentvaluejan1) / new_investmentvalue) * 100
  • Control: Arc Knob
  • Value: hsl_currentyearreturn
  • Min: .1
  • Max: 15
  • Step: .1

2. Return vs. Goal

  • Data Type: Decimal Number
  • Field Type: Calculated
  • (new_investmentvalue / new_investmentgoal) * 100
  • Control: Arc Knob
  • Value: hsl_goalprogress
  • Min: 0
  • Max: 100
  • Step: 1

By combining visual controls with calculated fields you can easily add visual context to a record and give your users a richer user experience.

Or condition between linked entities or multiple entites in MSCRM Fetchxml

We got a requirement to create view on Accounts which I own or which I am following. In this scenario we may not able to apply “OR” condition for the filters as the filters are split between the two entities (Account and Follows). We can achieve this using the below fetchxml but we can’t build this through Advanced Find. So either we can create a View through code or provide a report with the below fetchxml.

2018-10-25_1107

 

Hope it helps.

Set Default View to Inline Lookup View

Recently we got a requirement to set default view for marketing list inline lookup view on Contact Form. As we can’t customize the inline lookup view directly on Form editor, we need to write a piece of JS code to achieve this. The tricky part is to get the control name of the inline lookup. You can access the control like “lookup_subgridname” (case sensitive), for ex, in my case: “lookup_Marketinglisten”. We need to use “setTimeout” as the control will take some time to load on the Form.

JS Code (Form OnLoad event)

function filterMarketingListInlineLookupView() {
var marketingListInlineLookup = Xrm.Page.getControl(“lookup_Marketinglisten“);
if (marketingListInlineLookup) {
var activeMarketingListViewId = “{4bee031e-04d6-e811-8160-5065f38a4a31}”;
var defaultView = marketingListInlineLookup.getDefaultView();
if (defaultView != activeMarketingListViewId) {
marketingListInlineLookup.setDefaultView(activeMarketingListViewId);
}
}
setTimeout(function () { filterMarketingListInlineLookupView(); }, 500);
}

Hope it helps.