Notifications

77 views

Description

Automated Test Framework "Add Attachments to Form" and "Add Attachments to Existing Record" steps will fail if they are used to try to attach something to a table with the "No attachment" attribute explicitly set to "false."

This would be expected behavior when the attribute is set to "true", but when set to "false" the platform UI would allow adding attachments, and ATF is expected to be consistent with the platform.

Steps to Reproduce

This can be reproduced on any table that supports the "no_attachment" attribute, incident is used as an example

Prerequisite: Add "no_attachment" attribute to incident with value "false"
1) Navigate to System Defintion > Dictionary module
2) Find the "incident" collection (Table="incidnet" and Type="collection") and open it
3) Navigate to "Attributes" related list and click "New"
4) For attribute put "No attachment" and for value put "false" then click "Submit"

1) Navigate to Automated Test Framework > Tests module
2) Click "New", input any name and click "Save"
3) Click "Add Test Step", navigate to "Form", select "Open a New Form", and click "Next"
4) Set Form UI to "Standard UI" and Table to "Incident" then click "Submit"
5) Click "Add Test Step", navigate to "Form", select "Add Attachments to Form", and click "Next"
6) On the step form select "Upload attachments", then choose any file to upload (doesn't matter what)
7) Close the attachment pop-up and click "Submit"
8) Click "Run Test", pick any browser or open a new one and click "Run Test" on the pop-up
Expected: Test should succeed because no_attachment attribute is false
Observed: Test fails with output that looks something like this:
User does not have permission to attach to record '64d9d03773351010fe5311d8faf6a7cd' on table 'incident'

Workaround

It is possible to workaround this issue by removing the "No attachment" attribute from the table in question.

However, it is not recommended to remove attributes that were added to a table by default.

For more information see https://docs.servicenow.com/csh?topicname=c_DictionaryAttributes.html 


Related Problem: PRB1414126

Seen In

There is no data to report.

Intended Fix Version

Quebec

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-07-17 17:38:22
Published:2020-07-18