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:

  1. xrm.page.ui.tabs.get('new_fieldname').setvisible(false);
  2. xrm.page.data.entity.attributes.get('new_fieldname').setvisible(false);
  3. 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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -