The new Column comparison in queries in Dynamics 365 / PowerApps

Much needed feature.. Thank you Nishant Sir for the good examples.

Nishant Rana's Weblog

Column Comparison is one of the best features that has been recently added to the product.

Column comparison allows us to compare values of 2 different columns in our query be it Fetch XML, Web API, or through SDK API.

Sharing some of the basic examples that we tried using our favorite  FetchXML Builder

  • If we run the following query “Find all contact which has the first name equal to the last name”

The result –

  • Find all contact where the first name is not equal to last name

The result –

The operators supported are –

EqualLessEqualGreaterEqual
Not EqualLessThanGreaterThan
  • Only 2 columns can be compared.
  • Only compatible attribute types can be compared.
  • E.g. “Find all contact where the first name is equal to address 1 city”

The result

It works as both are string attributes.

  • If we try comparing text field with options set, we…

View original post 111 more words

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