Hide Rule Form Tool bar buttons by using OOTB activity

Hello, Today in this blog we are going to see how to hide Rule Form Toolbar buttons by using OOTB activity.

In pega platform we are having one activity called "WBToolbarSettingsDefault"  which is used for setting the visibility properties to hide / unhide by giving (true or false) to the properties.

So when ever you are opening the rule form of any rule type.

Then we can see button's on rule form like Check-In,Check-Out,Discard,Save,Actions,Save As and many more.

If we have a scenario like hiding the button's from production of specific rule instances.

so that the people in production application will not able to see those Rule Form Toolbar buttons of that rule instances.

We will see one example like for all the reports (Reports are instances of Class: 

Rule-Obj-Report-Definition) we should hide the Toolbar buttons for all the reports.

1. Initially the if you see the below report definition the all the toolbar buttons are visible.

2. First of all create a activity with name "WBToolbarSettingsDefault" in the class: 

"Rule-Obj-Report-Definition" 

This activity is picked at run time while picking the rule form of any report.

3. And now add the step with property-set method and set the properties with value false like below.
after that save the activity and open the report again.

4. Now in the below image we can see all the toolbar buttons are hidden for the report.

5. So what exactly does is like pega already configured visibility for all the buttons with some properties and pega had given values as 'true' for those properties.so we can able to see all the buttons.

If we don't want to show buttons then we should write the activity with those properties and set that properties values as 'false'

So that the value of the specific button visibility property will overridden from true -> false

Then we can't see the buttons in the rule form of the rule type.

Note: Activity name should be "WBToolbarSettingsDefault" & class should rule type instance class Ex: Rule Type: Report , Class: Rule-Obj-Report-Definition

6. By ading when condition on the property-set method we can restrict this hiding based on access group / opertaor / application etc.,

7. Some visibility properties for hiding the toolbar buttons given below in image, so that you can make them as 'false' for hiding.

Post a Comment

0 Comments