Mention height and width in Percentage instead of Pixels – Modal Popups in Dynamics 365 CE – NavigateTo

Hi Everyone,

Today a bug was created by the user saying the popup window is too small and we were using below code to show the HTML Webresource as a popup.

var pageInput = { pageType: "webresource", webresourceName: "WebResourceName" };
        var navigationOptions = {
            target: 2,
            width: 400,
            height: 300,
            position: 1
        };
        Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
            function success() {
                // Handle dialog closed
            },
            function error() {
                // Handle errors
            }
        );

When we have checked the code was working fine and able to see the window normally. After some checks with the users came to know that User has 19 inches monitor and that has opened doors to fix the issue. We all know that we have to use percentage instead of pixels for height and width and here is the way to use the same in NavigationOptions of NavigateTo function.

Here is the modified code of the same.

var pageInput = { pageType: "webresource", webresourceName: "WebResourceName" };
        var navigationOptions = {
            target: 2,
            //width: 400,
            //height: 300,
            width: { value: 90, unit: "%" },
            height: { value: 90, unit: "%" },
            position: 1
        };
        Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
            function success() {
                // Handle dialog closed
            },
            function error() {
                // Handle errors
            }
        );

Hope this helps.


Happy 365’ing
Gopinath

Preview Contact and Owner information by just hovering on the lookup – Dynamics 365

Hi Everyone,

Today I was testing something on the trail instance and I just hovered on the Contact lookup and saw pop out window like below. I haven’t observed this so far.

Somehow I am impressed with it as this is giving information to the users by just hovering.

When you click on Show More button, the details are opened as a popup. I couldn’t find the form that is being using here to add any of custom fields. If anyone finds, please let me know.

Users can click on Email and Phone links which will open Outlook and or Skype (if it configured else we can pick an app option)

Similarly we can view owner details by hovering on Owner lookup.

When you click on Update your profile, it opens Delve.

Show more opens the information as a popup like below.

These improvements might not be great functional changes but certainly gives good experience to users and make their lives easier for day to day activities.

If you would like to disable these, there is a setting available in System Settings as below and we can disable it.

“Enable users to view contact cards for quick access to contact information”

Hope this helps.


Happy 365’ing
Gopinath