Wednesday, April 20, 2011

CRM 2011 - Hide Form Feilds And Rows Using Java Sript

//Call bellow Function as HideField( "Feild Name", true);
function HideField( fieldName, removeEntireRow )
{
 var elem = crmForm.all[fieldName + "_c"];
 if( elem != null ) elem.style.display = "none";
 elem = crmForm.all[fieldName + "_d"];
 if( elem != null ) elem.style.display = "none";    
 
 if (removeEntireRow)
 {
  var elem = crmForm.all[fieldName + "_d"];
  if( elem != null ) elem.parentElement.style.display = "none";
 }
}

No comments:

Post a Comment