Possible to add date created for attachments in CSM/FSM Configurable Workspace?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 06:58 AM
Our users would like the date (added) to be displayed on the attachment on a case in the CSM/FSM Configurable workspace.
We know there is a solution to add it to the UI (https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1343190), but our users' business process is to work from the CSM/FSM Configurable workspace.
A prior implementation partner told us this: "Workspace components are part of a secured application within ServiceNow that cannot be edited or easily be swapped to another component. This would be a rather large scale configuration, as this would be changing platform functionality itself."
Is there no solution for the workspace that wouldn't go against this (understood) 'no-no' change to platform functionality?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2024 09:39 AM
Hi @maryellc
To display the date created for attachments in the CSM/FSM Configurable Workspace without making extensive changes to platform functionality, you can use a UI Component Extension. Here’s a high-level approach:
Create a Custom UI Component:
- Develop a custom UI component that fetches and displays attachment details, including the date created.
- Use the sp-attachment component as a reference and extend it to include the date created.
Embed the Custom Component:
- Embed this custom component within the Configurable Workspace using the UI Builder.
- Ensure it replaces or supplements the existing attachment display functionality.
Use GlideRecord to Fetch Attachment Details:
- In your custom component, use GlideRecord to fetch attachment details, including the date created.
- Display these details in the desired format.
Example Code Snippet:
// Example of fetching attachment details var gr = new GlideRecord('sys_attachment'); gr.addQuery('table_sys_id', current.sys_id); gr.query(); while (gr.next()) { var attachmentDetails = { name: gr.file_name, dateCreated: gr.sys_created_on.getDisplayValue() }; // Add logic to display these details in your custom component }