- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2022 01:12 PM
Hi,
In our system, we make the comment box available for our clients in the service portal when an incident is not closed yet. When the incident is updated into closed status, the comment box becomes unavailable. This is done with ACL write permissions.
To make sure that this behavior is always respected, I am trying to make an ATF to test if the comment box is writable or not for the client.
I have been looking around for a way to check that, but I can't seem to find it. I have tried to check if 'Additional Comments' is in read-only with Field State Validation (SP) but even when the box is available, the read-only verification doesn't trigger an error (as it should).
Here is a screenshot of the box I am talking about:
And here is a screenshot of where I'm at with my ATF:
I am creating a user and a random form, and I am able to open it after that. After these steps, I am impersonating my user and I have the form opened in front of me with the comment box.
How can I then check if the comment box is available or not? It seems like I can't use Set Field Values (SP) because it doesn't detect the box as a field value.
I hope that I was clear enough, don't hesitate to ask me more questions.
Thank you and have a nice day.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2022 02:55 PM
Here is how you do it:
- Use a "Generate Random String" step to generate a string to use for the comment.
- Open the form. Set the Comment field to the random string. Save the form.
- Search the sys_journal_field table using the sys_id of your task and the random string as the value. Try to find the comment that you just added.
If you can find the comment in sys_journal_field, then you were able to add a comment.
If you cannot find the comment in sys_journal_field, then you were blocked from adding a comment.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2022 02:55 PM
Here is how you do it:
- Use a "Generate Random String" step to generate a string to use for the comment.
- Open the form. Set the Comment field to the random string. Save the form.
- Search the sys_journal_field table using the sys_id of your task and the random string as the value. Try to find the comment that you just added.
If you can find the comment in sys_journal_field, then you were able to add a comment.
If you cannot find the comment in sys_journal_field, then you were blocked from adding a comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2022 05:27 AM
Hi, thank you for your quick response.
I'm a little bit of a newbie with Service Now. I added these steps for your points 1 and 2:
Can you explain to me how to do the 3rd point? I am not sure how to search in the journal field with the ATF options.
I found this test step, but I can't specify a value for the field:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2022 05:59 AM
Hi, thank you for your quick response. I'm a little bit of a newbie so could you explain to me how to save the form for step 2? I can't seem to find the right option to do so.
Here's where I'm at so far:
I can't find the right way to submit the form or save it after step 7.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2022 06:36 AM