Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

setDisabled doesn't work in Wave2 2020

(2) ShareShare
ReportReport
Posted on by 140 Most Valuable Professional

Hi, 

Does anybody has the same problem in Wave2 2020, and knows when it will get fixed?

Using the Xrm SDK , when setDisabled(true) is called from another tab, it doesn't work.

After switching back to the tab containing the control, setDisabled with the same value (in my case "true") won't have any effect until I call it one with "false".

Another special effect: after I switch back to the tab containing my control, I can edit the control only ONCE. After I leave the control,  it gets finally disabled:

setDisabled.gif

Kind regards,

Diana

  • Dima M. Profile Picture
    Dima M. 44 on at
    RE: setDisabled doesn't work in Wave2 2020

    Hi Diana,

    just wanted to inform you that I am facing the exact same issue when I try to disable all controls when a condition is met after saving the record. It seems to work on the current tab, but not on other tabs. I also tried to call setDisabled on TabStateChange - with original context from OnLoad-Event and context from TabStateChange-Event - nothing seems to work. It only works when I reload the whole page or reopen the record.

    *EDIT*: Same effect comes up with business rules.

    Kind regards,

    Dima.

  • PabloCRP Profile Picture
    PabloCRP 1,088 on at
    RE: setDisabled doesn't work in Wave2 2020

    I didn't notice about it but you can replicate change de setDisabled method from other tab then return  and changing that value then it get disabled, Any Update? in UCI interfacce

  • Peter Hale - QLD Profile Picture
    Peter Hale - QLD 480 on at
    RE: setDisabled doesn't work in Wave2 2020

    our issue is actually setVisible   -   TypeError: Cannot read property 'setVisible' of null   -  and I'm using FormContext

    might need to do a 'null' test

  • Peter Hale - QLD Profile Picture
    Peter Hale - QLD 480 on at
    RE: setDisabled doesn't work in Wave2 2020

    We are having issues as well - have find a work around or a ticket - or just let the disabled not work until it is fixed

  • Diana Birkelbach Profile Picture
    Diana Birkelbach 140 Most Valuable Professional on at
    RE: setDisabled doesn't work in Wave2 2020

    Hi Adrian Begovich,

    That doesn't work nether. I've posted the Xrm.Page way to access it, because it's simpler to test in the console, without having to write a script for it.

    Besides that, Xrm.Page is deprecated but not removed yet, so it should still work.

    But as I said, the "formContext" way to access it, doesn't work too.

    Kind regards,

    Diana

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 1,019 Super User 2025 Season 1 on at
    RE: setDisabled doesn't work in Wave2 2020

    Hi Diana Birkelbach,

    The Xrm.Page Client API is deprecated so use its replacement Client API instead.

    formContext.getControl(arg).setDisabled(bool);

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans