How to attach a screenshot automatically in a custom field in Incident form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2025 08:48 AM
I have a screenshot stored within one table in ServiceNow. Whenever a incident is proposed to a major incident, I want to attach that screenshot automatically in that custom field, in the incident form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2025 09:10 AM
If you want to copy the file then do this
1) create a system property to hold that static image, add file there. in the value field add the system property sysId
2) use before update business rule with proper condition for Incident Proposed to Major Incident and set that field with sys_attachment sysId using this script
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
current.u_attachmentField = gs.getProperty('propertyName');
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2025 08:30 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader