Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
DirkLehmann
Advisor
Advisor
0 Kudos

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
  • Approve with Comments
  • Reject
  • 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.

 

Open the Forms sections and search for the hidden ERPApproval form.


Open it and you'll see a list of all objects belonging to the ERPApproval form.


Select the Approve action and do a right click on the Programmer's pane to open the Programmer's Pane details dialog.



Change the view of the details dialog to Action.
On the second tab you'll find the definitions when the action should be hidden.


Change the given formula

to

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.

 

Let's check the result on Lotus Notes client side:
                

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.