Modify Dynamics GP Forms
A Microsoft Dynamics GP (“Dynamics GP”) client wanted to add a field from one form to another and map that information to the new location. The creation of of the fields and adding to forms in Dynamics GP through out-of-the box (OOB) methods. However, in order to map two fields, we utilize a suite of add-on tools called GP Power Tools. Let us dive in and take a closer look at the problem and how we solved it.
What is Microsoft Dynamics GP?
Dynamics GP is a business management software made by Microsoft, designed to help organizations manage their financials, operations, supply chain, project management, human resources, and customer relationship management (CRM). It is an enterprise resource planning (ERP) solution used by businesses across various industries such as manufacturing, distribution, healthcare, and professional services. It is one of the on-premise Microsoft ERP service offerings with over 30 years of product maturity and thousands of modules to resolve any of your business needed.
What is GP Power Tools?
GP Power Tools are tools and utilities designed by
Winthrop Development Consultants to enhance the functionality and usability of Microsoft GP. They have various developer tools that can be used to customize, troubleshoot, debug and manage Dynamics GP.
The Solution
The OOB Dynamics GP Modifier is used to add fields to the PM_Transaction_Entry form.
GP Power Tools is utilized to set up a trigger than fires whenever the ‘Vendor ID’ field is populated or changed. Our the ‘Focus Event – Field Changed’ trigger, fires when a field is changed using the form lookup, user entry, or programmatically (Extra Information: ‘Focus Event – Field Change’ fires only when the change is done using the look up or manually).
When fired, this trigger populates the ‘Payment Method’ field with the value corresponding to the selected Vendor ID. The trigger performs the necessary actions in the ‘Script’ tab. The programming language used here is ‘Dexterity’ and ‘sanScript’. You’ll see some default code already in place, we can get rid of the nested if clause since we want our script to run even if Vendor ID is empty.
GP Power Tools ‘Helper’ function at the bottom of the screen insert code to perform various tasks such as:
clicking buttons on the form programmatically,
changing whether a field is enabled or not,
changing the read-only setting of a field,
getting and setting field values on a form, execute SQL, .Net or Dexterity scripts, and
getting a table field value.
The helper function greatly reducing coding guess work. Our solution is choosing to return one of the user defined fields on the Vendor Maintenance form.
GP Power Tools Helper function generates the following code. By assigning the “IN_Value” variable to ‘MBS_String_Value1’ (as the comments suggest), the Vendor ID value from the trigger is used to filter the table rows and obtain the necessary field (‘User Defined 1’). The warning message is replaced with a statement to assign the obtained value to our custom field ‘(L) GSN_Payment’.
Security Note
Changing the forms means that you will have a modified form. Remember to adjust users security settings to that they can see and utilize the form changes.
Conclusion
This is only few of the features that can be implemented, by leveraging OOB features with GP Power Tools, running solutions with higher complexity can be accomplished and I hope to give you a taste of what I mean with my next post!