Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
How to add the ability to add attachments to the defect form when opened through the Report Defect link from the test case record - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How to add the ability to add attachments to the defect form when opened through the Report Defect link from the test case record
KB0692109

How to add the ability to add attachments to the defect form when opened through the Report Defect link from the test case record


1709 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Issue



Description


By default OOB there's no way to add attachments to a new defect (rm_defect) form if it's opened from the test case (tm_test_case_instance) via the "Report Defect" link since the header bar (where the attachment icon is located) is not visible.

 

This article details that steps that can be taken to workaround this behavior to allow users to still be able to add attachments to the new defect form.

Procedure


1) Create a new UI Action:


Name: Add Attachment
Table: Defect [rm_defect]
Action name: add_attachment
Show insert: checked
Show update: checked
Client: checked
Form link: checked
Onclick: myFunction()
Script:
function myFunction()
{
saveAttachment(g_form.getTableName(), g_form.getUniqueValue());
}

Once this UI Action is created there would now be a related link on the rm_defect form that users can click to add attachment to the record.

 

2) Add the "Attachments" related list to the form as an embedded list (this can be done by going to rm_defect form > Configure > Form Layout > Add "Attachments" related list to the form).

Please note that the rm_defect form that is opened through the test case form is using the 'Scrum' view so one would need to add the "Attachments" element to that view.
This extra step is needed so users would know/see what attachment(s) they have added (attachments would normally show on the header of the form but since that's not available this would be the workaround for it).

 

Applicable Versions


All versions that use Test Management application

Additional Information


Creating UI Actions

Test Management documentation


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.