1

I want to disable home page component like below code:

    if(UserName == 'Abc'){            
       **document.getElementById('hPendingProcessWorkitemsList_title').disabled=true;**
       }else if (UserName == 'bcd'){
          **document.getElementById('homeCalendarSection').disabled=true;**
    }

but I am getting null value on highlighted section.

Am I doing any thing wrong? I am using this java script code in vf page which I will add in home page.

Thanks

salesforce Developer
  • 3,338
  • 11
  • 55
  • 101

1 Answers1

1

You shouldn't need to hack javascript.

Each Profile can have a different Home page layout, configured by the System Administrator.

If you want User 'Abc' to see something different from 'bcd' then create a different profile for each. In defining the profiles it might help to ask yourself why you want them to see different Home layouts.

powlo
  • 2,650
  • 4
  • 29
  • 46