Javascript Code
function KullaniciActiviteGirAccount(kullanici) {
var kullanici = Xrm.Page.context.getUserId();
if (kullanici != null && kullanici != undefined) {
kullanici = kullanici.replace('{', '').replace('}', '');
if (kullanici == "2154F6F1-DC54-E211-AAA4-00155D005200" || kullanici == "CFB253CC-DC54-E211-AAA4-00155D005200") {
setVisibleTabSectionAccount("notes and activities", "accountactivitiesgrid", true);
}
else {
setVisibleTabSectionAccount("notes and activities", "accountactivitiesgrid", false);
}
}
}
function setVisibleTabSectionAccount(tabname, sectionname, show) {
var tab = Xrm.Page.ui.tabs.get(tabname);
if (tab != null && tab != undefined) {
if (sectionname == null || sectionname =="")
tab.setVisible(show);
else {
var section = tab.sections.get(sectionname);
if (section != null && section !=undefined) {
section.setVisible(show);
if (show)
tab.setVisible(show);
}
}
}
}
Hiç yorum yok:
Yorum Gönder