
Form Control provides a “No Code/Low Code” Customization tool for Microsoft Dynamics GP that can revolutionize how users, consultants and developers can make changes to how GP windows work. It was added as a new module to GP Power Tools with the release of Build 31.
This is the third article in a series of four articles. The series provides an introduction to Form Control, why it was created, how it works and what it is capable of doing. I will describe how the initial example of making Maintenance windows Read Only was configured. Then I will provide details of some extensions that can be added. The final article has downloadable sample projects for both Customer and Vendor Maintenance.
This article explains how to add some extensions to the Form Control ID, such as a password and hiding disabled buttons. This follows on from Part 2.
Adding a Password to the Form Control ID
If you wish to use a Password to control if the window should be Read Only, you can apply a Password ID to the Base Settings Rule.
- Open the Form Control Setup window and select the Form Control ID desired.
- Double click on the Base Settings rule in the tree or select it and click the Edit Button to open the Form Control Setup Rule window.
Create the Password ID with the prompts needed in the languages used on your system.
- Enter the Password ID: FORM CONTROL CUSTOMER and tab off the field, select “Add” on the dialog. The Password Setup window will open.
- The Password ID and Project ID will be populated already.
- Enter the Password Name: Password when opening Customer Maintenance windows.
- Enter the Password as desired. You can use the Show Password checkbox if you want to confirm what you have entered.
- Edit the default prompts and add additional languages as desired.
- Click Save and close the Password Setup window.
- Click OK to close the Form Control Setup Rule window.
- Click Save or press Ctrl-S to save the changes on the Form Control ID.
Now when the window is opened, the user is asked for a password. Getting the password correct will allow editing of the window, getting the password incorrect or cancelling the dialog will open the window in Read Only mode.
Hiding the Email and EFT Bank Buttons
The Control Mode Templates for the Maintenance and Address windows do not exclude the Email and EFT Bank Buttons on the Maintenance and Address Maintenance windows (respectively); the buttons will be shown but disabled when the Lock Field rules are applied.
If you would prefer to hide the buttons instead, a Hide Field rule can be added to the Form Control ID.
- From the Form Control Setup window with the Form Control ID displayed, click the Add button (plus symbol) and select Field Rule > Hide Field.
- No changes are needed on the Form Control Setup Rule window, so just click OK to add the Rule.
- Double click on the default Resource Filter to open the Form Control Setup Resources window.
- As we want to have more than one Resource Filter included, check the Allow Multiple Resources checkbox.
- Change the Form Mode to Ends with and Form Name to _Maintenance.
- Change the Field Mode to Exact and Field Name to Email Button.
- Click OK to save the Resource Filter.
Now add the other button we want to hide.
- While selecting the Hide Field Rule (or a resource filter under the rule), click on the Add button (plus symbol) and select Resource.
- As we want to have more than one Resource Filter included, check the Allow Multiple Resources checkbox.
- Change the Form Mode to Ends with and Form Name to _Address.
- Change the Field Mode to Exact and Field Name to Bank Button.
- Click OK to add the Resource Filter
- Click Save or press Ctrl-S to save the changes on the Form Control ID.
That completes the changes to hide the Email and Bank buttons.
On opening, the window will now show without the buttons we have just hidden.
More Information
Here are the articles in this series, they will be available after the publishing date:
- 13-Sep-2024: #GPPT Form Control Introduction – Making Maintenance windows Read Only – Part 1
- 16-Sep-2024: #GPPT Form Control Introduction – Making Maintenance windows Read Only – Part 2
- 17-Sep-2024: #GPPT Form Control Introduction – Making Maintenance windows Read Only – Part 3
- 18-Sep-2024: #GPPT Form Control Introduction – Making Maintenance windows Read Only – Part 4
For more information see:
- GP Power Tools Portal: http://winthropdc.com/GPPT
- GP Power Tools Samples: http://winthropdc.com/GPPT/Samples
- GP Power Tools Videos: http://winthropdc.com/GPPT/Videos
Hope you find this example useful.
David
This article was originally posted on http://www.winthropdc.com/blog.







3 thoughts on “#GPPT Form Control Introduction – Making Maintenance windows Read Only – Part 3”