Can we restrict 'Insert' and 'Insert and Stay' buttons on the approval records to only admins?

Shrivatsa Hegde
Tera Contributor

I have seen this in many instances where these options are not available for approvers. But in one of my other instances, I can see that this is available for the approver as well. I want these buttons 'Insert' and 'Insert and Stay' to be hidden from all except admins. Please let me know what I am missing here or I need to fix anything. Thanks in advance. 

 

1 ACCEPTED SOLUTION

Hi @Shrivatsa Hegde 

 

You can create a new UI actions with same Action name as buttons 'Insert' and 'Insert and Stay'.

Then you can override the condition in the new UI Action as required and it will not affect anywhere else

View solution in original post

4 REPLIES 4

Manmohan K
Tera Sage

Hi @Shrivatsa Hegde 

 

You can append gs.hasRole('admin') to the UI Action condition to make the buttons visible only for admins

Below image shows how you can add condition to UI action

 

ManmohanK_0-1686120991530.png

 

Thanks for the response @Manmohan K . Do we have any other way to perform this instead of tweaking the OOB UI action?

Hi @Shrivatsa Hegde 

 

You can create a new UI actions with same Action name as buttons 'Insert' and 'Insert and Stay'.

Then you can override the condition in the new UI Action as required and it will not affect anywhere else

Sai Kumar B
Mega Sage
Mega Sage

@Shrivatsa Hegde 

Both UI actions are associated with the global table, and changes to those UI actions can impact all the global artifacts.
If I could help you with my response you can mark it as helpful and correct as it benefits future viewers
Thanks,
Sai Kumar B