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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM Control setVisible() only shows Label

(0) ShareShare
ReportReport
Posted on by

Hi,

I was trying to show/hide controls on CRM form(onload) using  Xrm.Page.getControl("controlname").setVisible(true). But I can see only label not the control.

Is there a way to make it work with field label position top?

Workaround: 

1) This happens only when controls are set "visible by default" false, if we set this to True and set control visibility to false, it works fine.

2) Set field label position is set to side, it works. 

As per my requirement I needed them to work with field label position top.

Appreciate your inputs!

-Shanker

*This post is locked for comments

I have the same question (0)
  • Karsten Wirl Profile Picture
    4,477 on at

    Hello Shanker.

    Please can you add a screenshot to visualize your issue?

  • Community Member Profile Picture
    on at

    Hi,

    thanks for your response. first image label set as top.

    CRM-error2.JPG

    if label is set to left

    CRM-error2.JPG

  • Karsten Wirl Profile Picture
    4,477 on at

    Thanks for the screenshots. Have you worked with the Browser console to check for errors on your onload event?

  • Community Member Profile Picture
    on at

    There are no error in console.

    same form works fine with labels left side. This is not for this form. It is behaving same for all the forms :(.

  • Karsten Wirl Profile Picture
    4,477 on at

    Really interesting.

    What happens, when you enter data in the field, save and open again?

  • Community Member Profile Picture
    on at

    Control is not present on the form. We can't reach the control, tried tab as well.

    I ended up using unsupported script for now: 

    var curElement = document.getElementById(controlname + "_d");
    if (curElement != null)
    curElement.style.display = '';

  • Suggested answer
    MAJBlackburn Profile Picture
    80 on at

    We had this exact issue, our current solution is to turn off legacy form rendering, but since this is a 2011 to 2016 migration, that has its own set of risks (mostly having to re-test a couple dozen other pages on a compressed timeframe). I'm very tempted by the unsupported approach, honestly, even though it means getting a waiver from the client. The "turbo" forms have not been a great experience so far.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans