How to hide a global UI Action/ button in Scoped applications.


Description

Hide Global UI Actions such as 'Submit' and 'Save' in scoped applications. 

Release or Environment

All

Resolution

1. Find the UI Action that you want to hide in the sys_ui_action table.

2. In the condition field add the following script:

&& current.getTableName() != '<table name>'

3. Save the UI Action. 

4. Clear the instance cache by typing cache.do in the application navigator.

 

OR

 

1. Go to the global UI Action in the sys_ui_action table.

2. Change the table from Global to the table name that you want the UI Action to be hidden.

3. In the condition field, add a script that will never be true (For example ! current.canCreate() )

4. Right-click on the header and click ‘Insert and Stay’.

 

This will create another UI Action with all the same properties as the global one but overrides the global UI Action and hides it as well.

Make sure, the new UI action has the exact same action name and properties as the other. (Hence I advise the ‘Insert and Stay’ so that you do not have to change anything else other than the condition and the table. 

 

Additional Information

Here are more details about the getTableName() API on the developer website:

getTableName()