a client would like to see the last communication date on the company summary screen, has anyone been able to do this before and if so would anyone have any sample code for this please
I wish I had money for the number of times I've been asked for this. It saves 1 click on the communications tab. Also you need them to be very clear on how they decide on how they wish to determine the last communication. Are you using the created date, updated date, start date? If you use the the created date you may create a communication for a start date in a years time. What communication action are you interested in? Communication type? You will meet the requirement because you will always finds situations which don't work. In the end when you explain the problems and the resulting cost going up to save 1 click you'll find they will soon decide it isn't a good idea. Being a good consultant isn't saying yes to everything. Sometimes you should say no.
I get asked this from time to time, I handle it via a SQL Trigger on the Communication table, to update a date/time field I create on Company. (sometimes it could be Opportunities, in other times both)
Through the script I then handle the customers requirements, Do you only show the date from a communication assigned to the sales team? Do you ignore eMarketing Comms? Do you ignore 'Pending' comms? All action types or just some? Though for the date most times it tends to be the Start Date of the communication in the majority of times.
The problem I've always found is that the criteria can always be broken and then you end up with a customer that keeps wanting it altered, all to save them just one click on the communications tab when on the company summary screen.
When discussing requirements with customers, I apply a monetary value to a request when the ends doesn't justify the means. For example, I had a very complex request for a report which had to be done in SQL Reporting Services in the end. It took around 2 weeks to develop and in general it took about 5 minutes to run, but it saved the company 1 week per month of one person's time. So the cost of the report was justifiable when you look at what they save in having it done. For things like this, you've either got the quick look tab or the communications tab which will give you that information with a single additional click by the user to show them the information they need.
thanks Matthew i was able to do this via a trigger as you suggested