How to copy close notes to addition comment while closing the sc task

VIKAS MISHRA
Tera Contributor

As per the requirement when we close the task then the close notes should be auto copied to "additional comment", how can i do this please suggest. 

9 REPLIES 9

OlaN
Giga Sage
Giga Sage

Hi,

I would suggest you create a Business rule, that copies the field value, with a condition on task close.

Coud you please give me the code to acheive this as my BR is not working on it.

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

    var openedBy = current.opened_by;
    var assignmentGroup = current.assignment_group;
    if (assignmentGroup == 'e8c3483c1b118510f48c65f7b04bcb0d' || assignmentGroup == 'ed09322b1b0c4d10680a0e9cdc4bcb43' || assignmentGroup == '551536e91b22cd10680a0e9cdc4bcb6a') {
		
        var comment = current.close_notes;
		gs.addInfoMessage(comment);
        //current.comments = comment;
       current.comments  = comment;
    }



})(current, previous);

Here, have a look at my example below,

copy-value-to-additional-comments1.png

 

copy-value-to-additional-comments2.png

Eswar Chappa
Mega Sage
Mega Sage

@VIKAS MISHRA You can achieve this using flow designer  as below with no code

 

Eswar4_0-1692095097458.pngEswar4_1-1692095114174.png

Eswar4_2-1692095341246.png

 

Please mark it Correct & Hit Like if this works!

Regards,

Eswar Chappa