how to populate most recent work notes in the list view

APV Babu
Tera Contributor

how to populate most recent work notes in the list view  plz Respond

 

 

Regards,

APV Babu

1 ACCEPTED SOLUTION

Jyoti Jadhav9
Tera Guru

Hi @APV Babu ,

 

If you bring the Work notes column on the list view, it shows all worknotes entries on the list layout.

You can create one custom String field and create before update business rule with conditions "Worknotes changes" to update the latest worknote comment in that custom field and bring that custom field on the list layout. 

Please see the below details.

Screenshot 1: Field creation.

JyotiJadhav9_2-1707381626346.png

 

  

 

Screenshot2: Business Rule Script

 

JyotiJadhav9_1-1707381181098.png

 

 

Script

(function executeRule(current, previous /*null when async*/) {

    // Add your code here
    var notes = current.work_notes.getJournalEntry(1);
    current.u_latest_worknote = notes;

})(current, previous);

 

**Note:

var notes = current.work_notes.getJournalEntry(-1);    // -1 for all the work notes value , 1 for latest work notes value

 

 

Please hit the like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

 

Thanks & Regards

Jyoti Jadhav

View solution in original post

6 REPLIES 6

Danish Bhairag2
Tera Sage
Tera Sage

Hi @APV Babu ,

 

There is a work Notes field available OOTB it does show most recent comments only at the top.

 

Thanks,

Danish

 

Jyoti Jadhav9
Tera Guru

Hi @APV Babu ,

 

If you bring the Work notes column on the list view, it shows all worknotes entries on the list layout.

You can create one custom String field and create before update business rule with conditions "Worknotes changes" to update the latest worknote comment in that custom field and bring that custom field on the list layout. 

Please see the below details.

Screenshot 1: Field creation.

JyotiJadhav9_2-1707381626346.png

 

  

 

Screenshot2: Business Rule Script

 

JyotiJadhav9_1-1707381181098.png

 

 

Script

(function executeRule(current, previous /*null when async*/) {

    // Add your code here
    var notes = current.work_notes.getJournalEntry(1);
    current.u_latest_worknote = notes;

})(current, previous);

 

**Note:

var notes = current.work_notes.getJournalEntry(-1);    // -1 for all the work notes value , 1 for latest work notes value

 

 

Please hit the like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

 

Thanks & Regards

Jyoti Jadhav

Is there any way to remove Time stamp?

 

 

Yes, There is a way to remove the timestamp. 

 

Update the below code line:

 

 var notes = current.work_notes.getJournalEntry(1).match(/\n.*/gm).join("\n");
 

Please hit the like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

 

Thanks & Regards

Jyoti Jadhav