Opportunity Products Subgrid Issues in Microsoft Dynamics 365 v8.2.1259

Jordan Hohepa, 08 May 2018

At the time of writing this blog, an update for Dynamics 365 Online instance has been pushed with a version number of 8.2.1259. With this update, I found two issues regarding the functionality of the Out of the box Opportunity Products Subgrid’s inline edit view. The first issue would cause the subgrid to get stuck on “Loading Records” as shown in screenshot below. The second issue would stop bundles in the subgrid from being expanded.

In this example, I had a plugin which would create an Opportunity Product based on a set of conditions. With the recent update, the subgrid can get stuck in a ‘Loading records’ loop and would not display the Opportunity Products related to the current opportunity.

image

When opening developer tools (F12) in Internet Explorer, I could see that the page was getting the error shown below when the form loads.

image

While debugging on load of the form, I found that there was a null reference error being thrown in the GridControl.js script. It turns out that the Opportunity Product being added by the plugin did not set a default manual discount, meaning that when this part of the script is trying to reference a manual discount, it is returning an error. To fix this, the plugin was updated to include a default manual discount value of $0.00.

image

The second issue occurs when a product bundle has been added to the Opportunity Product subgrid. The screenshot below shows a subgrid which contains a single bundle with two products. Out of the box, the bundle should be able to expand and collapse using the arrow on the left side, but in this case, that does not happen.

In this example I had two fields inside the same section as the Opportunity Products subgrid with a Business Rule to show or hide these fields based on a set of conditions. Whenever this business rule was active, the subgrid would fail to load the bundles correctly and the bundle would not be expandable. I was also able to recreate the issue by duplicating the Business Rule functionality with JavaScript on the form.

image

It looks like this issue only occurs when the fields with show/hide business logic are in the same section as the subgrid. Moving them out into their own section does allow for these fields to be shown or hidden via business logic without affecting the grid.