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)

setVisible on a field leaves a space and does not move fields up

(0) ShareShare
ReportReport
Posted on by 5

Seems to me that setVisible used to move the fields up in CRM 2011, I've noticed sometimes in CRM 2013 it leaves a blank.

Here is what I'm trying to do.

Approver 1

Approver 2

Approver 3

Approver 4

There are scenarios where different approvers may not be required, for example 1 and 4 not required for one case; however in another 1, 2 and 4 are required.  I only want to show the names of the individuals involved.

function hideShowEmployee(employeefield)

{

var d = Xrm.Page.data.entity.attributes.get(employeefield).getValue();

if (d != null && d != "") {

Xrm.Page.ui.controls.get(employeefield).setVisible(true);

}

else

{

Xrm.Page.ui.controls.get(employeefield).setVisible(false);

}

}

*This post is locked for comments

I have the same question (0)
  • matthew.mickas Profile Picture
    505 on at

    I did a quick test of this by adding these to the contact form and using pretty much your exact javascript above.  Ran a few tests against chrome, firefox and IE 9 and did not see the same issues.  What browser have you seen this behavior in?  Also are you using a multiple column section that contains the approver text fields?

    I would also do a check to make sure that you are not getting and javascript errors.

  • RajYRaman Profile Picture
    25 on at

    When all the fields in the row is hidden then the entire row will be hidden. The only time it did not behave this way is when there was a text area. There is an exisiting Connect request I logged about this behaviour -> connect.microsoft.com/.../preventing-empty-space-in-form-when-hiding-textarea

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi David,

    It depends on your layout as well.

    Are those fields belonging to same section or different section?

    Maybe you can share us the form editor screenshot?

    Thanks.

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