locked
CRM 2011 java script email attachment field RRS feed

  • Question

  • I want to hide not only the email message field at times but also the Attachment field.  I am not able to hide the attachement field, is its name different or does it need some other way to hide that field?  I have no problem hiding the Message field.

    Thanks

    gHideField = function (name){
         var field = document.getElementById(name+'_d');
         var fieldcapt = document.getElementById(name+'_c');
         if(field != null){field.style.display='none';}
         if(fieldcapt != null){fieldcapt.style.display='none';}
     };


            gHideField('Description');   // DOES WORK

            gHideField('Attachment');    // DOES NOT WORK
            gHideField('Attachments');   // DOES NOT WORK

    Friday, April 15, 2011 3:22 PM

Answers

  • This worked

     Xrm.Page.ui.tabs.get(1).sections.get(0).setVisible(false);

     

    • Marked as answer by NC_Matthews Friday, April 15, 2011 6:33 PM
    Friday, April 15, 2011 6:33 PM