The one with the button that disappears
I was asked recently whether it’s possible to hide the Approve or Reject buttons in the default Leave- or Travel Management form, in order to force the user to use the Approve (or Reject) with Comments button.
There’re customers out there that require their approvers to add comments to their decisions.
Means they should not only Accept or Reject a request, but also add some comments why they decided that way.
With the default decision form that comes with Alloy, an approver has four options:
- Approve with Comments
- Reject with Comments
Changing those values is quiet easy thanks to the customizing features of Alloy.
Open Domino Designer and open the master mail template
Please note: Changing the Lotus Domino master mail template can cause severe problems on your Lotus Domino and Lotus Notes system.
Change the given formula
in order to hide the Approve button for every leave request that comes through Alloy.
You could do the same also for Travel Management requests. The coding would change accordingly.
Close the dialog and save the form. Do the same changes also for the Reject action on the ERPApproval form in order to hide the Reject button.
At the end make sure your changes won’t get overwritten by the design template refresh that is scheduled on your Lotus Domino. Therefore right click on the ERPApproval form (from the Forms list) and select Design Document.
Make sure the box Prohibit design refresh or replace to modify is checked. This ensures your changes won’t get overwritten by the next design refresh.
You’re for sure free to expand this example and e.g. add some checks whether a user entered at least a few characters as comment etc. It’s easy and fun with Alloy by IBM and SAP.