- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 08:52 AM
Hi all,
I have to modify the default upload to the "sys_attachment" table in ServiceNow. We're using scoped apps and I don't want to affect other apps which are using the default upload dialog as well. The upload dialog is written in Jelly (UI Page). Is there a way to create a second upload function or UI Page with some custom changes in the dialog box? (I need a field: documenttyp - and I need it in the DIALOG (must)). Or are there any best practices/ideas? I tried to copy the default attachment UI Page but when I call it via GlideDialogWindow the dialogbox is empty.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 12:02 AM
Hi Max,
Loading attachment through GlideDialogWindow here is the script
var sysId = g_form.getUniqueValue(); // sysId of the record to which attachment is to be added
var tableName = 'incident'; // table name give as per your table name
var dialog = new GlideDialogWindow("attachment2");
dialog.setTitle("Add Attachment");
dialog.setPreference("target_sys_id",sysId);
dialog.setPreference("target_table",tableName);
dialog.render();
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2018 11:43 PM
Hi,
The above example was for calling attachment from some UI action I guess
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 02:03 AM
Hi Max,
Can you also mark answer as helpful and hit like. Thanks in advance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader