RE: How to Hide Home page Activate and deactivate Button based on Javascript.
Hi Pankaj Thanks for your reply.
why we need to create new buttons? it does not work for existing one?
below is my function
Contact_Ribbon_ActivateDeactivateSubGrid: function (selectedControl) {
debugger;
//formContext=primaryControl.executionContext();
Contact.IsTeamLead = rcm_common.UserHasTeam("ABC");
Contact.IsCallCenterUser = rcm_common.UserHasTeam("PQR");
if(selectedControl.length>0)
{
if (Contact.IsTeamLead || Contact.IsCallCenterUser) {
return false;
}
else {
return true;
}
}
},
and below is screen shot of my enable rule

i have referenced the coomon js as well.
and instead of rcm_common.NaN is used isNaN as well but still not working. its not going in common.ja and getting the team for which i am checking.