watch list users should be able to update the comments in incidents and RITM's irrespective of roles

vallusri
Tera Contributor

watch list users should be able to update the comments in incidents and RITM's irrespective of roles. I have tried

 in PDI by writing new ACL. But it is not working. Could you please help me how to write ACL. Thanks in advance.

5 REPLIES 5

Tanushree Maiti
Tera Patron

Hi @vallusri 

 

Try this one..you need to create total 4 ACL.

 

  1. Create a Write ACL (Table level ACL) on the specific table without specifying a field
  • Operation: write
  • Name: incident and sc_req_item  ( 2 write ACL , you will create)
  • Condition: None  //you mention your condition
  • Requires Role: snc_internal

 

  1. Create a Write ACL (Field level) for the Additional comments field
  • Operation: write
  • Name: incident.comments and sc_req_item.comments ( 2 write ACL , you will create)
  • Script:

 

answer = checkWatchList();

function checkWatchList() {

        if (current.watch_list.indexOf(gs.getUserID()) > -1)

    {

        return true;

    }

    return false;

}

 

 

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

PoonkodiS
Giga Sage

Hi @vallusri 

In ACL,

Type : record

operation : write

table :incident

field :Additional comments

Check the Advanced box.

In the Script field,


if (current.watch_list.indexOf(gs.getUserID()) > -1 || current.caller_id == gs.getUserID() || current.opened_by == gs.getUserID()) {
answer = true;
} else {
answer = false;
}

 

For RITM,

Replace the table name with : sc_req_item


if (current.watch_list.indexOf(gs.getUserID()) > -1 || current.requested_for == gs.getUserID() || current.opened_by == gs.getUserID()) {
answer = true;
} else {
answer = false;
}

PoonkodiS_0-1780047637183.png

Refer :End users are unable to write comments on RITMs for Requests created for someone else - Suppo...

 

 

 

Ankur Bawiskar
Tera Patron

@vallusri 

you didn't share ACL screenshots you created

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar 
i was created below two ACL's to enable the functionality like watchlist user can be view/update the comments in requests  in service portal.
But issue here is watchlist user can only view the RITM but cannot update the comments.Could you please assist me here.