Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

how to use the xrm.page api to hide a control?

$
0
0

Hello - How can I hide a control with the Xrm.Page API? I've seen different ways to get a reference to a CRM control. For example:

var control = Xrm.Page.getControl("some_control_id")

However, when I execute this code in the FireBug console for a CRM form, the console displays an error:

"Object doesn't support property or method 'getControl'"

Also, although Xrm.Page returns a reference in a FireBug watch, Xrm.Page.ui returns null. So as can be expected I don't have a reference to Xrm.Page.ui.controls in Firebug.

I was thinking that all CRM forms should have full access to the Xrm.Page API by default. Do I need to add some type of reference or setting to the form to get full access to the XRM API, do I need to access the XRM API differently or is something else missing?  Also, after I get to the point where I can get a reference to the control, does Xrm.Page make it fairly easy to hide the control? For example:

var control = Xrm.Page.getControl("some_control_id"); control.hide();

Thanks for your input on this!


Viewing all articles
Browse latest Browse all 82002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>