locked
Make a hidden field stay visible after save/load RRS feed

  • Question

  • I'm fairly new to CRM 2011 and I am unable to find a proper solution for my problem.

    I have a couple of fields that are hidden and will remain hidden unless another field condition is met. After I save or load the file the field would resort back to being hidden.

    Would I have to make a javascript to check if the field is visible during the onload event to make sure it stays visible?

    Thanks

    Wednesday, November 6, 2013 4:17 PM

Answers

  • Yes, you would need to use JavaScript to set the field visible value on load. Although, JavaScript will not change the default setting of the field. So each time form opens you would need the JavaScript to trigger to make the desired fields visible or not.

    I would use an if statement to check if the other field condition is met, if it is then you can use the code below to set the field to visible.

    var control = Xrm.Page.ui.controls.get("fieldname")setVisible(true);


    • Edited by KawasakiRider03 Wednesday, November 6, 2013 4:36 PM
    • Marked as answer by TeaYou Wednesday, November 6, 2013 4:43 PM
    Wednesday, November 6, 2013 4:34 PM

All replies

  • Yes, you would need to use JavaScript to set the field visible value on load. Although, JavaScript will not change the default setting of the field. So each time form opens you would need the JavaScript to trigger to make the desired fields visible or not.

    I would use an if statement to check if the other field condition is met, if it is then you can use the code below to set the field to visible.

    var control = Xrm.Page.ui.controls.get("fieldname")setVisible(true);


    • Edited by KawasakiRider03 Wednesday, November 6, 2013 4:36 PM
    • Marked as answer by TeaYou Wednesday, November 6, 2013 4:43 PM
    Wednesday, November 6, 2013 4:34 PM
  • Thank You
    Wednesday, November 6, 2013 4:43 PM