Add worknote of sysapproval_approver record

Aruna Sree Yela
Tera Guru

Hi, I have a workflow where approval group activity was setup.

 

I need to put short description of group approval record[sysapproval_group] into approval record[sysapproval_approver] comments.

 

Tried with before insert Business Rule with the below code

 

 

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

    var grpRec = current.group;
    current.comments = "test1 " + grpRec + " end1";
    current.comments = "test2 " + grpRec.short_description + " end2";
    current.comments = "test3 " + current.state + " end3";

    current.update();

})(current, previous);

 

 

 

Output:

ArunaSreeYela_0-1709216274209.png

 

I can get the sys_id of the group record[sysapproval_group] but its not fetching thats short_description.

Note: group field is reference

 

Any guidance please!

 

Thanks

8 REPLIES 8

@Aruna Sree Yela 
It should populate, I tried it in my PDI and it was working fine for me.

Is this happening for a specific user or for all?

@_Gaurav 

I'm testing it as an admin!

 

And may I know if these kind of scenarios happen in scoped application? Cuz I doing that in custom scoped application

@_Gaurav 

 

In my PDI also I'm getting same issue

 

ArunaSreeYela_0-1709308584555.png

 

If possible, can you please attach the snip of your trails.

Hi @Aruna Sree Yela 
I did the test in the background script.