Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Disable a section in dynamics 365 crm form

Posted on by 185

Hi..I am using dynamics 365 crm online . Below code is not working when I am trying to disable a section onchange of a field.

(Note : There is a HTML webresource in the section.That webreource is a button) 

var ctrlName = Xrm.Page.ui.controls.get();

for (var i in ctrlName) {

var ctrl = ctrlName[i];

var ctrlSection = ctrl.getParent().getName();

if (ctrlSection == "tab_3_section_2") {

ctrl.setDisabled(true);

}
}

Can some one please help me on this ? Thanks in advance !!

*This post is locked for comments

  • Suggested answer
    RE: Disable a section in dynamics 365 crm form

    Hello ,

    Go through with this , might be helpful for you

    community.dynamics.com/.../crm2011-disable-enable-fields-sections-tabs-and-the-whole-form

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Disable a section in dynamics 365 crm form

    Disabling a section will disable fields within that section, but will not affect the any web resources (as it has no knowledge of the content of these web resources). If you want to disable the button in the web resource, you could use getObject on the web resource control to get the IFrame object, and you should then be able to navigate to the button via the document object of the IFrame.

    Or, you could create a separate web resource with a disabled button, and load that instead

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans