In the communications table we have comm_note and comm_email. If the comm type is email, the details go into comm_email otherwise it goes into comm_note. All well and good. A customer of mine has a good reason to want to see the notes in a list. The communication list calls vCommunication. However, if the list only has comm_note in it, they can't see the contents of the email. They don't want to put both in. In old versions of CRM the email contents went into comm_note but this was changed a while back.
So, what I did was to create a dummy field in translations called comm_alldetails and then I altered the view so that instead of comm_note it did a calculated field:
isnull(comm_note, comm_email) as comm_alldetails.
Then in the list I can show the calculated field. All well and good except the email contains HTML tags. So when the email contents are shown and it is an HTML mail from Outlook via plugin, you get unreadable text. So, a few years ago, I put in a SQL function to strip out the HTML on the fly. Now the system has been in use for a good while now and there are lots of communications, the communications list is taking ages to load. Sometimes as much as 30 seconds. Take the HTML stripping code out of the SQL view and it is fine, albeit with SQL.
The customer asked me if it is worth having an escalation that copies the stripped HTML out into a new field. I don't like this approach myself as it duplicates data. Anyone any other ideas? They have SQL 2014 if that helps and they're on 7.3SP3
Thanks.