Comment Log Visibility - Newest to Oldest?

Hi everyone,

My company currently uses the Comment Log for internal status tracking, tagging, etc. Some projects are more complex and thus have extensive logs.

  • Is it possible to adjust the Comment Log visibility so that the newest comments are on top instead of having to scroll all the way down?
  • Is there a way to only show a certain number of comments at a time? (ex: a "See Previous Comments" feature)

I've tried digging through the Studio to see if this is possible, but have had no luck.

Thanks in advance for the help!

-Gilanne

  • Hi ,

    It currently is not possible to configure the Comment Log field to change how the entries are sorted. However, the Comment Log dashlet does sort from most recent comment to oldest as you desire:

    Additionally, the dashlet only shows the 3 most recent comments. If the user wants to see older comments, they click a 'View All' link to load the remaining comments in the dashlet. It seems to meet both of your use cases well, so I recommend having your users place the dashlet on the record view intelligence pane and then removing the field from the record view layout. 

    Chris

  • Thanks Chris! This fits our needs exactly. 

  • To have all your comment Logs ordered with most recent first you can add a file to your custom directory with a simple vardef:

    custom/include/SugarObjects/implements/commentlog/vardefs.php

    with the following PHP:

    Fullscreen
    1
    2
    <?php
    $vardefs['fields']['commentlog']['order_by'] = 'date_entered:desc';
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    FrancescaS

  • Thanks for sharing, Francesca! I'll share this option with my team as well.