How to add an attachment in Glide Dialog window?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 11:25 PM
Hi All,
I have a requirement. I am calling a custom UI page through GlideWindow API using UI action on form .
I want to add add attachments to the form as well using same GlideWindow.
I am new to UI page creation . Need suggestions how to add an attachment box in the UI page and then how to process the attached file.
I can see their is an OOB attachment page, can it be utilized? and If yes then how?
All suggestions are welcomed..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 11:42 PM
Hi Deepti,
If your requirement is only to add attachment, why not use the normal attachment paper clip icon? If you really want to use the OOB UI Page, you can use the code below in your UI Action.
function add_attachment()
{
var gdw = new GlideDialogWindow('attachment');
gdw.setPreference('target_sys_id', g_form.getUniqueValue());
gdw.setPreference('target_table', g_form.getTableName());
gdw.setPreference('attachment_disabled', false);
gdw.render();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 11:50 PM
I need to add some more fields including attachment because of which I am not able to use attachment paper clip.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 12:10 AM
Ok then you can copy the OOB attachment code and its client script and use that in your custom UI Page. It should work fine. But make sure you are passing the below parameters from your UI Action.
gdw.setPreference('target_sys_id', g_form.getUniqueValue());
gdw.setPreference('target_table', g_form.getTableName());
gdw.setPreference('attachment_disabled', false);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2017 10:08 AM
I am able to merge both of the UI pages now attachment is working fine.
Next step is to send those attachments in Email Notification , I am able to do that as well. But it is sending all the attachments added to that record.
Is this any way to send selective attachments in email notification.