Update approvals

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 04:44 AM - edited 11-26-2024 06:24 AM
Hi,
I have created a business rule on sysapproval_approver table to update approval history of ritm to additional comments. I have tried below code but its not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 05:01 AM - edited 11-14-2024 05:02 AM
Hello @Community Alums :
Since you're writing thr BR on the Approval table, there must be any data base operation that needs to be taken place on approval table in order to run your BR. So instead if you need approval history on demand
1) Create an UI action in RITM table(Visible based pn specific condition).
2) Glide to approval table and bring the approval history and update.
Hope this will solve your issue. Please accept the solution or mark the answer as helpful if it helps in anyway.
Thanks,
Kiran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 06:50 AM
Hi @Community Alums ,
Use below code, it will work.
var ritm = new GlideRecord('sc_req_item');
ritm.get(current.document_id);
var message =current.comments.getJournalEntry(1);
ritm.comments = message;
ritm.update();
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2024 09:50 AM
Hi Runjay, Thanks for your response. I tried this but additional comments are not getting added.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2024 02:34 AM
Hello everyone. I am new here.