Enable/Disable the field placed in multiple places on the form

Hi Everyone,

Today I was writing JavaScript code to disable the field on some condition and observed that the field is not getting disabled. I was little surprised and tried with some other field and it worked perfectly. By this, I understand that there is some problem with this field and after some search understood that the same field has been placed on other tabs as well.

To fix it, we just have apply loop through the control. Here is the sample code for the same.

formContext.getAttribute("SchemaName").controls.forEach(
function (control, i) {
control.setDisabled(true);
});

Hope this helps.


Happy 365’ing
Gopinath.

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 –

Equal LessEqual GreaterEqual
Not Equal LessThan GreaterThan
  • 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