Skip to content

Commit 1a16ab0

Browse files
authored
README.md file
Instructions about the code and it's functions
1 parent 86a1473 commit 1a16ab0

File tree

1 file changed

+19
-0
lines changed
  • Server-Side Components/Background Scripts/Get top 10 largest attachment

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Top 10 Largest Attachments in ServiceNow
2+
3+
This script retrieves and logs the top 10 largest file attachments from the `sys_attachment` table in ServiceNow.
4+
5+
## Script Purpose
6+
7+
- Find the largest attachments stored in the instance.
8+
- Display file name, size in MB, and the related table.
9+
10+
## How It Works
11+
12+
- Queries the `sys_attachment` table.
13+
- Sorts by `size_bytes` in descending order.
14+
- Limits results to 10.
15+
- Converts size to MB and logs details using `gs.info()`.
16+
17+
## Usage
18+
19+
Run this script in a **Background Script** or **Script Include** in ServiceNow.

0 commit comments

Comments
 (0)