- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 12:39 AM
Hey everyone,
short question on Scripts together with ACL. We do have our update incident inbound action script that will update the current.comments whenever a mail is received and adds that mail.
This shall work everytime, regardsless if the user is the opener or in watchlist. Our user in watchlist CAN update the record in portal, but for some reason the script doesn't add the comments whenever a user in watchlist answers on the records.
I mean the mail do is in the history of the ticket, but the mail doesn't get copied to the additional comments as the script tells it to be.
The received mail tells me: Update Incident : did not create or update incident using current
The script in question ends with
so I was thinking it might has to do with the ACL's. However, I checked the incident table and write for incident as well as incident.comments is allowed for people in watchlist (which is why they also are allowed to update in portal, I suppose).
So how does the script decide who CAN write and updates?
What ACL will be triggered here?
Anyone has any idea? Maybe I am also overlooking something.
Regards
Elena
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2024 01:37 AM
We found what was the reason for it not working.
ACL needs table as well as field access.
In ACL we had write access on the record for incident.* but not for the table, just incident.
This caused the incident to update, but not to change the additional comments automatically. After creating the write ACL for the table alone, it started to work as expected.
Thanks everyone for helping me to figure it out. The debugger did the trick here to see what was the issue. 🙂
Still weird to me that it was able to update the incident via the portal though.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 12:49 AM
@ehgebla Since you are checking current.canWrite(), the write ACL on the respective table would be checked. If the user doesn't have the write access on the record, the ACL would get failed and the record would not get updated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 12:58 AM
Hi Sandeep, it's on incident table and the watchlist user do have write access. Both to incident as well as incident.comments in ACL. It still fails.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 01:13 AM
@ehgebla According to definition
canWrite()
Type | Description |
---|---|
Boolean | Flag that indicates whether the user's roles permit writing of records in this table.
Valid values:
|
please use the ACL debugger to identify which ACL is failing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 01:13 AM
@ehgebla , Basically ACL Validates Based on Logged In user and you current Script is Validating if Current user can Include Comments or not - Check if this ACL has some Roles like ITIL , Admin etc. so based on that roles validation ACL allows Access
Note : ACL Works Same as native UI in portals , Workspaces everywhere.
Regards,
Shyamkumar
Regards,
Shyamkumar