add field from task table to approval (sysapproval_approver) table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2023 06:22 AM
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,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2023 06:40 AM
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 mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2023 06:56 AM
You can dot walk to the created by field as well like this:
Get to the above screen by going into the approval record and right-clicking the header. Configure>Form Layout
Result will look like this: