Export the worknotes only

swathi55
Tera Contributor

Hello,

 

I have created a custom table which extends task table  and have a Worknotes field. I need a export button on Service Operation workspace(SOW) so that user can click on the button and export the worknotes  in a Excel format. Is there any way to do it? Any suggestions?

 

Thanks

1 REPLY 1

TharaS657398130
Tera Guru

Hey There!

Yes, this is possible. Since your custom table extends the Task table and you already have a Work Notes field, you can add a custom “Export Work Notes” action in Service Operations Workspace (SOW). When the user clicks the button, the action can call a server-side Script Include, retrieve the work note entries from the sys_journal_field table for the current record, and generate a CSV file that can be opened directly in Excel.

 

I would recommend CSV rather than generating a real .xlsx file because it is much simpler to implement and maintain in ServiceNow. The SOW action can be configured as a workspace/form action, and the Script Include will handle fetching the work notes and preparing the file for download.