Custom Ui action not working when impersonated with non-admin account

Nikhitha Gandhi
Tera Contributor

Requirement:

 

By impersonating a user with the BCM Program Manager (sn_bcm.program_manager) or BCM Admin (sn_bcm.admin) role, the user is able to view a "Cancel" UI action in all BIA (sn_bia_analysis) records.

If the "Cancel" UI action is clicked, a modal window will appear that will require the user to provide justification via comments, then the record should move to the "Closed Incomplete" state. 

 

Ui action code:

function cancelBia() {
    var modal = new GlideModal("sn_bia_ABT:Cancel_Bia", false, 500);
    modal.setTitle(getMessage("Request additional information"));
    modal.setPreference('methodName', "cancel_bia_analysis");
    modal.setBackdropStatic(true);
    modal.render();
}

if (typeof window == 'undefined')
    updateTask();

function updateTask() {
    current.update();
    action.setRedirectURL(current);
}
 
Cancel button is working properly with system admin account, but not working when impersonated with bcm program manager user role.
8 REPLIES 8

J Siva
Tera Sage

Hi @Nikhitha Gandhi 
Are you getting any error? Could you also please share some screen shots if possible?
Regards,
Siva

I am not getting any error.

NikhithaGandhi_1-1743149705382.png

 

When I impersonate to BCM program manager user: After clicking on submit, the record should move to 'Closed Incomplete' state, but it stays is Pending approval state only. When clicked on Cancel button with system admin account the record moves to 'Closed Incomplete' state.

Medi C
Giga Sage

Hello @Nikhitha Gandhi,

Please check if BCM program manager user role has enough Write Permissions (ACL) to modify the state on your table.
You can check the Write ACL  sn_bia_analysis.YOUR_STATE_FIELD if it has the roles sn_bcm.admin and sn_bcm.program_manager. (Add them if they aren't there)
Check if there is any scripted condition on the ACL that could be stopping the update.

 

If there are no ACLs, please try creating ones for your field and check again.

 

I hope this helps!

 


If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.

There are no ACLS for sn_bia_analysis.state field. So, I created the write ACL for state field with the sn_bcm.admin and sn_bcm.program_manager. But it is not working.