Hello Experts,
i need help with my code.
I try to Display/Hide a SubGrid when a field have a specific value.
But if i try to run my code in CRM i get an Error that my function isnt defined...
Did i make a mistake in my Code?
function displayContacts() {
// get businesstypecode from CRM
var var businesstype= Xrm.Page.getAttribute('businesstypecode').getValue();
if (businesstype == 'Maschinenringe Allgemein') {
Xrm.Page.getControl('ParentContacts').setVisible(true);
Xrm.Page.getControl('subgrid_Entitlement').setVisible(false);
} else if (businesstype == 'Maschinenringe e.V.') {
Xrm.Page.getControl('ParentContacts').setVisible(true);
Xrm.Page.getControl('subgrid_Entitlement').setVisible(false);
} else {
Xrm.Page.getControl('ParentContacs').setVisible(false);
Xrm.Page.getControl('subgrid_Entitlement').setVisible(true);
}
}
Thank you in advance!
Regards
Léon







