ACL on state field

Karinush
Tera Contributor

Hello,
I need your help.
I need to perform an ACL on the table of requested items, the goal is that the user will not be able to change the status in the form by himself. But he will be able to close the request through a UI ACTION button.

KarinShriki1_0-1700565515750.png

 

This is what I have tried to do, But the access is blocked so that the request cannot be closed from the UI button.
I would appreciate your assistance!

KarinShriki1_1-1700565599922.png

KarinShriki1_2-1700565610914.png

 

 

4 REPLIES 4

Samaksh Wani
Giga Sage
Giga Sage

Hello @Karinush 

 

Fo the user not to change the status by himself, you can use UI Policy to make that field read only.

 

So by doing so your UI Action access will not be get blocked and at the same time, user cannot be able to change the status manually as the field will be read only.

 

Plz mark my solution as Accept, If you find it helpful.

 

Regards,

Samaksh

Hi, thanks for the response!
Is there a way in which I can bypass the UI POLICY so that in front of the admin user the field will not be read only?

Hello @Karinush 

 

You can add the condition to the UI policy, so that it will be read-only for specific users and not to the admin.

 

Write below script into Execute when true :-

 

function onCondition() {

if(!g_user.hasRoleExactly('admin')) {
	g_form.setReadOnly('<name_of_field>', true);
}

}

 

Plz mark my solution as Accept, If you find it helpful.

 

Regards,

Samaksh

Sandeep Rajput
Tera Patron
Tera Patron

@Karinush Along with the ACL you created, you just need to create a Close UI Action to update the state of the current RITM to Closed Complete.

 

Here is how you should configure your UI Action.

Screenshot 2023-11-21 at 5.57.01 PM.png