Tuesday, 13 June 2023

Disable all fields using JavaScript - Dynamics 365 code

      disableformFields(executionContext);



function disableformFields(executionContext) {

    var formContext = executionContext.getFormContext();

    var formControls = formContext.ui.controls;

    formControls.forEach(control => {

        if (control.getName() != "" && control.getName() != null) {

            control.setDisabled(true);

        }

    });

No comments:

Post a Comment

Dynamics 365 — Retrieve More than 5000 records with FetchXML

  When you’re working with Dynamics 365, you may have encountered a limitation when it comes to retrieving records. The maximum number of re...