update all approvals as a single comment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 09:15 AM
Hi,
I want to add all approvals to the additional comments of ritm as a single comment. I tried writing Business rule on sc_req_item with below code.
The approvals which are in requested state should be added as a single comment only but it is triggering the number of times the approvals are requested. I want to add all the approvals in requested state in single additional comment and approval in approved or rejected in another additional comment. Can someone pls suggest what's wrong in the script. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 09:41 AM - edited 11-21-2024 09:41 AM
Hi @Community Alums ,
Additional comments are of type Journal. So, whenever you use it, it will hit and go down and create a record in sys_journal_field table.
So, if you want to append to the same one, you need to GlideRecord sys_journal_field filtering with element comments and Element ID with sys_id of the current record, which is Highly discouraged
and edit the same one.
GlideRecord sys_journal_element is not a good practise. It holds all the comments of all the records.
It's better to push back the requirement or to accept the current acceptance.
If the above information helps you, kindly mark the above information Helpful or Accept the solution.
Regards,
Najmuddin.