2015年2月12日 星期四

CRM 2011 Hidden Tab in JavaScript

CRM 2011 Hidden Tab  in JavaScript

JavaScript:
  1. function hiddenTab ()
  2. {
  3. var statecode;
  4. var statecodeValue;
  5. var visible = false;
  6.  
  7. statecode = Xrm.Page.data.entity.attributes.get("statecode");
  8.  
  9. if (statecode != null && statecode.getValue() != null)
  10. {
  11. statecodeValue = statecode.getValue();
  12. if(statecodeValue != "1")
  13. visible = true;
  14. }
  15.  
  16. Xrm.Page.ui.tabs.get('tab_3').setVisible(visible);
  17. }

沒有留言:

張貼留言