- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I have a doubt in one requirement is given to me i.e., On the incident form state is resolved of incident after that I want to attach the attachments on incident form but they can't show on my approvals on service portal and I also want to do that on portal as well. So, How to manage this in ServiceNow Anyone please help me on this.
Thanks
Yash
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @yashgarg
If your incident gets Resolved, then why do need approvals on the incident??
But for custom requirement, you can create a Business Rule that copies the attachment from the Incident to the Approval record whenever a new attachment is added or when an approval is generated.
(function executeRule(current, previous /*null when async*/) {
// Find the approval record related to this incident
var approvalGR = new GlideRecord('sysapproval_approver');
approvalGR.addQuery('sysapproval', current.table_sys_id);
approvalGR.query();
while (approvalGR.next()) {
// Copy the attachment to the approval record
GlideSysAttachment.copy('incident', current.table_sys_id, 'sysapproval_approver', approvalGR.getUniqueValue());
}
})(current, previous);
Happy to help!
To help others in the community find this solution, kindly mark this response as the Correct Answer and Helpful.
Warm Regards,
Deepak Sharma
Community Rising Star 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Your requirement is not clear. Why do you want to show attachments in My Approvals page?
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
so on resolved INC you want to add file but it's not happening?
share some screenshots
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @yashgarg
If your incident gets Resolved, then why do need approvals on the incident??
But for custom requirement, you can create a Business Rule that copies the attachment from the Incident to the Approval record whenever a new attachment is added or when an approval is generated.
(function executeRule(current, previous /*null when async*/) {
// Find the approval record related to this incident
var approvalGR = new GlideRecord('sysapproval_approver');
approvalGR.addQuery('sysapproval', current.table_sys_id);
approvalGR.query();
while (approvalGR.next()) {
// Copy the attachment to the approval record
GlideSysAttachment.copy('incident', current.table_sys_id, 'sysapproval_approver', approvalGR.getUniqueValue());
}
})(current, previous);
Happy to help!
To help others in the community find this solution, kindly mark this response as the Correct Answer and Helpful.
Warm Regards,
Deepak Sharma
Community Rising Star 2025
