add field from task table to approval (sysapproval_approver) table

takysh
Tera Contributor

Hi all,

 

i want to make some customization on approval form, i want to add opened by field from task table to approval form, to let manager to see opened by who.

 

appreciate your help.

Br,

2 REPLIES 2

Basheer
Mega Sage

Hi @takysh ,

Create a customized field on approval form and name it as opened_by referering to user table(table basically which is on opened by in the main table).

from here you can do it in 2 ways either through Business Rules or Client Scripts on approval table

through Business rules 

Write it Before, on insert

var sourceTable = current.source_table;

var recordSysId = current.document_id;

var populateOpenedBy = new GlideRecord(sourceTable);

populateOpenedBy.addQuery("sys_id",recordSysId );

populateOpenedBy.query();

if(populateOpenedBy.next()){

current.opened_by = populateOpenedBy.opened_by;

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

Cheers,
Mohammed Basheer Ahmed.

matthew_magee1
Giga Guru

You can dot walk to the created by field as well like this:

matthew_magee1_0-1674140127347.png

 

Get to the above screen by going into the approval record and right-clicking the header. Configure>Form Layout

 

Result will look like this:

 

matthew_magee1_1-1674140183589.png