} else if (entitysavedsearch.equals("ENTITY") && savedsearch1.equals("ALL")) {
// This is exactly the same as above, except we are getting all
// individuals instead of just primary contacts.
String entitySearchId = (String) dynaform.get("entityId");
ArrayList results = new ArrayList();
results.addAll(remoteAdvancedSearch.performSearch(individualID, Integer.parseInt(entitySearchId), "ADVANCE", null));
// results contains our collection of entity ids.
Collection contactID = PTRemote.getContactsForEntity(results, false);
Iterator contactIdIterator = contactID.iterator();
HashMap individualIds = new HashMap();
while (contactIdIterator.hasNext()) {