Adding Date and Time in Manage Attachment ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2018 11:35 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2018 11:48 PM
Hi Shoheb,
For this you will have to modify the ui page named as 'attachment'. You can get the created time from sys_attachement table and can show on page.
Hope this helps.
Regards
Ujjawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2018 12:12 AM
HI,
Could you let me know more about modifying the UI attachment page to get date and time?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2018 02:08 AM
Hi Shoeb,
Try following script to update file names. You can use it in BR or anywhere else you want.
// script to update file names of attached files.
var gr = new GlideRecord('sys_attachment');
gr.addQuery('table_name', '<table name>');
gr.addQuery('table_sys_id', '<sys id of the record to whome attachments present>');
gr.query();
while (gr.next()) {
// get date and file name.
var gdt = gr.getValue('sys_created_on');
var fileName = gr.getValue('file_name');
// create new name for file
fileName += '-' + gdt;
// set name to file and update record.
gr.setValue('file_name', fileName);
gr.update();
}
Thanks,
Milind
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2018 12:17 AM
Hello All,
I just added a small script in UI macro attachment_entry and was able to get the desired output.
Script: ${sys_attachment.sys_created_on.getDisplayValue()}
Regards,
Shoheb Shaikh