Have you ever wanted to have a lookup on an Extender Form/Window and then populate another field with the description for that lookup?

Example 1:  I have Column 2, Row 1 on my form doing a lookup to the Customer Number.  I want Column 2, Row 2 to show the Customer Name automatically so I don’t have to type it in manually. 

Populating an Extender Field

The first thing to note is that to do this, it will require Extender Enterprise to do this.

To complete this setup, you will need to setup an Action.  Here are the steps to do that.

  1. On your Extender Window, click the Actions button.
  2. In the Extender Actions Window, click the Add button.
  3. In the Add Actions window, set the Event Type to “Change field value” and the Field to Customer Number.
  4. Click the Add button and select “Run Dynamics GP script”.
  5. In the Enter Script window, enter the following script.
    • clear table ‘RM_Customer_MSTR’;
      ‘Customer Number’ of table ‘RM_Customer_MSTR’ = <Customer Number>;
      get table ‘RM_Customer_MSTR’;
      <Customer Name> = trim(‘Customer Name’ of table ‘RM_Customer_MSTR’);
      close table ‘RM_Customer_MSTR’;  
  6. Validate the script and click Save on the Enter Script window.
  7. Click Save on the Add Actions window and OK on the Extender Actions window.  
  8. Save your Extender Window and test out the new action to see if the Customer Name automatically populates when you select a Customer Number.  On a window you will automatically 
Populating an Extender Field

Another example, I have an Extender Form where the ID Field Prompt is using a lookup to the Customer.  I want the Description Prompt to show the Customer Name.  If you are using Microsoft Dynamics GP 2018, later versions of 2016 or the latest version of 2015, there is already a feature included that will populate the Description Prompt with the Name field for the ID lookup that you select.  If you are on an earlier version, you can use the same script included in example one.

NOTE:  The script used here can always be edited to match the fields you are using.  It doesn’t have to be for the Customer Number/Name combination.   Here is another example for the Employee ID/Name combination.

clear table ‘UPR_MSTR’;
‘Employee ID’ of table ‘UPR_MSTR’ = <Employee ID>;
get table ‘UPR_MSTR’;
<Employee Name> = trim(‘First Name’ of table ‘UPR_MSTR’) + ” ” + trim(‘Last Name’ of table ‘UPR_MSTR’);
close table ‘UPR_MSTR’;


If you have any more questions about populating an Extender field with the description of another, or anything regarding Extender, feel free to reach out to us here.