# GetClaimNotes - Advanced Documentation ## Overview Retrieves all notes attached to a claim. Notes can be very large (hundreds of entries, megabytes of text). For comprehensive claim data without notes, use `GetClaimWithoutNotes` and call this separately only when notes are specifically needed. ## Script Patterns Notes can be large. Always filter or summarize before returning to the user. ```javascript async () => { const notes = await SecureApi.GetClaimNotes(771360); // Filter to recent notes const thirtyDaysAgo = new Date(); thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30); const recent = notes.filter(n => new Date(n.CreatedDate) > thirtyDaysAgo); // Summarize - don't return full text of all notes return { totalNotes: notes.length, recentCount: recent.length, recentNotes: recent.map(n => ({ id: n.ID, date: n.CreatedDate, author: n.CreatedByIDName, type: n.Type?.Name, preview: (n.Note || "").substring(0, 200) })) }; } ``` ## Cross-References | Need | Use Instead | |------|-------------| | Claim data without notes | `GetClaimWithoutNotes(ClaimID)` | | Claim with everything including notes | `GetClaim(ClaimID)` | | Create a note | `CreateClaimNote(NoteInfo)` | | Update a note | `UpdateClaimNote(NoteInfo)` | | Delete a note | `DeleteClaimNote(NoteInfo)` |