Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Duplicate Documents Displayed in DDR Request After Form Submission

deepikapani
Kilo Contributor
After uploading documents in the onboarding form and submitting the request, a DDR number is generated. When accessing the Due Diligence (DDR) request using the generated DDR number, the uploaded documents are displayed multiple times, resulting in duplicate document records.
1 REPLY 1

Vinod54
Tera Guru

Hello @deepikapani ,

This is known OOTB platform behavior documented in KB1124497. The DDR onboarding form is a Record Producer, and document uploads go through a two-stage process:

  • Stage 1 — Upload: File is stored in sys_attachment against the catalog/portal staging record.
  • Stage 2 — Submit: On form submission, GlideSysAttachment.copy() copies the attachment to the newly created DDR record — creating a second physical copy of the same file.

Both copies appear when viewing the DDR, resulting in the duplicate display.

📄 KB1124497 — Attachment variable on Record Producer duplicates attachments

 

Solution:

1. System Relationship : Instead of physically copying attachments, create a System Definition → Relationship to display attachments from the source catalog record as a Related List on the DDR form. No duplication, no extra storage.

📄 Community — Avoid Duplicating Attachments with GlideSysAttachment.copy()

 

To Clean Up Existing Duplicates
For DDR records already affected, use the hash field on sys_attachment to identify and delete duplicate copies via a Background Script.

📄 Community — Copy Unique Attachments Using Hash Deduplication

 

Additional Check
Inspect the DDR onboarding catalog item's Script field for a manual GlideSysAttachment.copy() call. If present alongside the platform's native copy, this causes more than two duplicates. Remove or guard it to prevent redundant execution.

📄 KB0777632 — Prevent Record Producer from Duplicating Attachments

 

If the answer helps hit the Helpful and Accept As Solution buttons. 

Thanks,

Vinod Kumar M