dynamics crm 2011 - MS CRM - setVisible -
i newbie crm , googling how hide , show text field using jscript
library in ms crm
(online) , found several options of using function setvisible
.
i tried options:
xrm.page.ui.tabs.get('new_fieldname').setvisible(false);
xrm.page.data.entity.attributes.get('new_fieldname').setvisible(false);
xrm.page.getattribute('new_fieldname').controls.get(0).setvisible(false);
but last 1 working. first option gives me error message.
what different between them?
just add points made..
the difference between
xrm.page.ui.tabs.get('new_fieldname').setvisible(false);
and
xrm.page.getattribute('new_fieldname').controls.get(0).setvisible(false);
the first refers tab (xrm.page.ui.tabs
), second refers attribute (xrm.page.getattribute
).
so if wanted hide whole tab, sections , fields can use first one. if want hide individual field can use
xrm.page.getcontrol("new_fieldname").setvisible(false);
which shortcut from
xrm.page.ui.controls.get('new_fieldname').setvisible(false);
Comments
Post a Comment