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

Generative Pages: Link Them to Your Model-Driven App Forms

  I’ve been hands‑on with Generative Pages in Model‑Driven Power Apps. Short version: you get results fast. And when you already know Datav...