Get Approval History or Details from Custom Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2020 10:23 PM
Hi I currently have 2 custom table that is extended from task. I want to display the approval history of approval sequence either via related list or chart within the form of the travel booking or any suggestions will also be ok.
Table Names:
1. Travel Booking
2. Approval Sequence
Scenario:
1. Create Travel booking Details
2. From the newly created travel booking, create approval sequence where user will input sequence of approval (e.g. 1-10) then input the approvers via list for approvals of approver.
- Labels:
-
User Experience and Design

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2020 06:27 AM
Hello @mark
Yes you can do it very easily.
1.Create a travel booking record.
2.Create Approval record on Approval sequence table manually.(I hope on Approval sequence record you are also storing travel booking ID)
3.Create a worlflow. with condition state is approval.
In workflow drag a Group Approval activity.
Click on advanced to write the code.
The code is.
var grapp=new GlideRecord('approval_sequence_table_name');
grapp.addQuery('tickect_booking_id_field_name which is on approval sequence table',current.sys_id);
grapp.query();
while(grapp.next())
{
answer.push(grapp.user.sys_id);//hope user is field on approval sequence table which stores the sys_id of user whose approval is required
}
Above code will send approval to all the users who has that particular tucket booking id reference.
Please keep posted
Regards
Yash Agrawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2020 05:09 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2020 09:49 PM
Hi Mark,
If you are on portal , then follow this link to show approval history with good UI,
Regards
Deepen shah
aavenir.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2020 09:55 PM
Yes Mark,
I would like to help you.But please tell me that from the above shared scrrenshot
Fields:- sequence,Approver,state,comment,date approved are all this field available on "Approval sequence" table.
If Yes,then we can bring all the above mentioned fields details on travel booking form,in the form of realted list.
Regards
Yash Agrawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2020 10:17 PM
Hi
Yes the fields is available on the approval sequence but the one thing I wasn't able to show was comments.
would it also work if the approvers are in a list? (e.g. Sequence 1 Approver has 4)
Regards,
Mark