public override void DeliverSearchResults(List <SearchResult> results) { base.DeliverSearchResults(results); try { string company = Convert.ToString(drMainRecord["PrimaryOrganization.Name"]); if (string.IsNullOrWhiteSpace(company)) { company = Convert.ToString(drMainRecord["Company"]); } if (!string.IsNullOrWhiteSpace(company)) { lblCompany.Text = company + "<BR/>"; } if (PortalPage.IsModuleActive("Volunteers")) { string volunteerID = Convert.ToString(drMainRecord["Volunteers_VolunteerRecord"]); if (!string.IsNullOrWhiteSpace(volunteerID)) { liVolunteer.Visible = true; hlViewVolunteerProfile.NavigateUrl += volunteerID; } } } catch { // catch, if the field is missing, hidden, or if it's a company } }
public override List <string> GetFieldsNeededForMainSearch() { var list = base.GetFieldsNeededForMainSearch(); list.Add("PrimaryOrganization.Name"); list.Add("Company"); if (PortalPage.IsModuleActive("Volunteers")) { list.Add("Volunteers_VolunteerRecord"); } return(list); }