// The filter string is very complex we need to get it from the EJB layer.
EmailFacadeHome facadeHome = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
String filter = "";
try
{
EmailFacade emailFacade = facadeHome.create();
emailFacade.setDataSource(dataSource);
filter = emailFacade.getRelatedEmailList(individualId, recordID.intValue(), contactType);
} catch (Exception e) {
logger.error("[Exception] RelatedEmailHistory.Execute Handler ", e);
throw new ServletException(e);