Taking Comment Timestamp and adding to a custom date field
We are using Zoho Projects, including the comments field extensively, and I have had a request from one of our PMs as follows: They would like to be able to sort projects in their project list view, by 'latest comment'. i.e. they would like to see the project that was last commented on (NOT the last project to be generally updated) at the top of the list. I cannot see any native functionality that would provide this list sorting feature, so had an idea that we could use a workflow to say:
Each time a comment is added to a project, retrieve the comment timestamp, and write to a custom field ('Latest Comment Timestamp) on that project. That field would just be overwritten each time a new comment was added.
Does anyone have any advice on how I could do this? I am guessing I can use a workflow (which does have an option to be triggered by 'comment') and then execute a custom function. Advice on the script for that function anyone?
Thanks