ModulesRemote moduleManagement = (ModulesRemote)ClientTools.getRemoteBean(ModulesRemote.class);
if (moduleManagement.hasModule(HierarchyCustomer.class.getSimpleName(), ClientGlobals.getUser(), ClientGlobals.getCompany())) {
logger.debug("Module exists - opening FmHierarchyCustomerEdit");
return new FmHierarchyCustomerEdit();
} else {
logger.debug("Module does not exist - opening FmCustomerEdit");
return new FmCustomerEdit();
}
} catch (Exception e) {
logger.error("Error looking for customer-module.",e);
return new FmCustomerEdit();