web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
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

  • Suggested answer
    Adrian Begovich Profile Picture
    1,032 Moderator on at

    Hi Diana Birkelbach,

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

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

  • Diana Birkelbach Profile Picture
    140 Most Valuable Professional on at

    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

  • Peter Hale - QLD Profile Picture
    480 on at

    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

  • Peter Hale - QLD Profile Picture
    480 on at

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

    might need to do a 'null' test

  • PabloCRP Profile Picture
    1,088 on at

    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

  • Dima M. Profile Picture
    49 on at

    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.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
ParthPatel249 Profile Picture

ParthPatel249 64

#2
11manish Profile Picture

11manish 48 Super User 2026 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 44 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans