How to display an error message when a user is not allowed to edit a ticket in SOW.(MRA)

PiyachatW
Giga Contributor

Background:
I have ACLs configured that users with ITIL role can read all tickets, but they can only write/edit tickets that belong to their assignment group.


Current behavior (As‑Is):

 

1. ITIL user opens a Change Request that they are allowed to edit (Change record belong to their assignment group).
2. ITIL user attempts to add a related record such as an Incident which they only have read access (Incident record not belong their assignment group).
3. Incident record can be selected, but it cannot be successfully related, and no error message is displayed to inform the user of the reason.

 

Expected behavior (To‑Be):
When user attempt to relate a record for which they do not have edit permission, the system should display an error message indicating that they do not have sufficient permission to relate the record because they are not allowed to edit. In service operation workspace view with MRA page in related recodes tab.

7 REPLIES 7

Not working in my problem when user did not have permission (ACL rules) 

-Itil user can read all ticket but can change value only their assignment group. So, when they add some relationship in related tab ticket out of their assignment group does not show and empty not alert or something. Then, I need to alert them when they add ticket out of their assignment group with, they do not have permission to add ticket that why ticket of their choose did not show on related tab. Or is it have another solution to set default value with "assignment group is(dynamic) one of my groups" on MRA

PiyachatW_0-1776821819625.png

 

Tejas Adhalrao
Kilo Sage

Hi @PiyachatW  ,

The reason no error appears is that ACLs fail silently in the background. To show a visible message in Service Operations Workspace, you should use a Before Update Business Rule on the record...

 

use Before Update Business Rule

(function executeRule(current, previous /*null when async*/) {
    // Check if the user has write access to the record
    if (!current.canWrite()) {
        gs.addErrorMessage("You do not have sufficient permissions to modify this record or relate it to the Change Request.");
        current.setAbortAction(true);
    }
})(current, previous);

 

Not working in my problem when user did not have permission (ACL rules) 

-Itil user can read all ticket but can change value only their assignment group. So, when they add some relationship in related tab ticket out of their assignment group does not show and empty not alert or something. Then, I need to alert them when they add ticket out of their assignment group with, they do not have permission to add ticket that why ticket of their choose did not show on related tab. Or is it have another solution to set default value with "assignment group is(dynamic) one of my groups" on MRA

Thank you.

PiyachatW_1-1776822969229.pngPiyachatW_2-1776822996106.pngPiyachatW_3-1776823016459.png