Skip to content
+1-888-319-3663

EONE BLOG

Tech Tuesday: Require Extender Data to be Entered for a Window


We (should) all know that when creating an Extender window, we can set fields on the new window to be required.

Extender Window

Figure 1: Field 1 is marked required

Notice in the Extender window IV_TRX above, I have made the Field 1, Short Note, to be required.

During entry to this Extender window, if the record is attempted to be saved without that field being entered, we get the standard error:

Not all required fields have been entered.

Figure 2: Required fields not entered error

Figure 2: Required fields not entered error

So that works as expected and intended.

But recently a customer requested a bit of a twist on this requirement.

While we can force the user to enter our required data in Extender, we cannot force them to open the window and enter in data.

Meaning that I can enter the GP record (an Inventory Adjustment record in this example) without having to enter Extender data.

Out of the box, Extender will not do this. That does make sense since we can hook an Extender window onto most any GP window so there isn’t a way to make this work in a generic sense. So can we make this happen?

Yes, it is possible after a fashion with a few caveats.

  1. We need to write code so that we have to be on Extender Enterprise
  2. We can’t trap all of the possible events so the solution will be more of a “try to catch honest mistakes” and not “100% bulletproof”

The reason that this solution won’t be 100% bulletproof is that while Extender Enterprise gives users a development solution, it isn’t a substitute for a full Dexterity developer environment.

Working with core Extender Enterprise functionality, the only way that we can accomplish our goal is to write a new Extender Action.

To do so, go into the Extender Solution and choose Actions.

For our action, we can code it so that if the user presses the Save button, we will run our validation script. If that fails validation, then cancel our save.

The not “100% bulletproof” solution is that if the user tries to browse to the next record and gets the “Do you want to save this document?, we cannot catch this message and so our logic will not run.

Creating the Action, we set it up as below:

Figure 3: Extender Action- Dynamics GP script

Figure 3: Extender Action- Dynamics GP script

Choose the Add button and “Run Dynamics GP script”

Figure 4: Enter Script

Figure 4: Enter Script

The name of the script can be anything – however I have chosen a descriptive name that tells me what the script is going to do.

Also note the Product select – Microsoft Dynamics GP.

This Product was selected because the window being referenced (Item Transaction Entry) is a Dynamics GP window.

The code isn’t very complex however if you don’t know a little about Dexterity then you might wonder what it is doing. I’ve included comments in the code to highlight the areas and functionality.

I’ve included the script in the zip file that contains the window, action, and the script itself for reference here.

The highlights of the script are:

  1. Pull the Extender key values from the GP UI
  2. Call GetRecordFromJoinedKeys() function to find the Record ID of the Extender record
  3. If the Record ID is 0, then the data was not entered
  4. If the data was not entered, give a message to the user. Move focus away from the “Save button” so that GP will not save the GP record

After creating the Action, logging out of GP and then coming back in to enable the new Action, we see that the new Action works as expected.

Figure 5: Action successful

Figure 5: Action successful

To implement this on your Extender Enterprise 2013 System.

  1. Download the xml file that contains the Window and Action
  2. Import this using the Extender | Import Menu
  3. Exit GP
  4. Log into GP and company again to activate the action
  5. Test

If you have any questions regarding this blog you may leave Pat a comment below!

3 Comments

  1. Sanjay Parab on June 8, 2015 at 6:12 am

    Hi Patrick,

    I am having same issue with W8 Form of Vendor Management. I can save that form but I cannot print by keeping any of the field. If I show 0.00% also at percentage field then also I am getting same error message.

    Please let me know how I should resolve it. I have tried to click on Extender Solution and but I cant access that. I am using GP 2013 R2

    Please provide any suggestion on this.

    Regards,

    Sanjay

  2. Haitao on May 15, 2017 at 11:56 am

    Does it work on GP 2010?

  3. Vernon on May 5, 2020 at 4:14 pm

    I have written simple Extender window off the Purchase Order Enter form. I have added an Extender field and made it required. I have made the widow auto open after tabbing off the PO Number. If the user cancels the Extender window without entering the “required” field data, the user can still Save the PO. How can I make the “required” Extender field required? Can I remove the Cancel button?

Leave a Comment





RECENT POSTS


Happy Thanksgiving from eOne! - US Office Closed November 25 & 26
Popdock: What is your Locale?
Q4 2021 Partner All Hands Call - Recording Now Available
An Announcement regarding SmartList Builder and SmartView from eOne Solutions
Join us for the Q4 2021 Partner All Hands Call!

POPULAR POSTS


2016 SmartConnect Integration Bootcamps
Tech Tues: Automatically refreshing Pivot Tables in Excel Refreshable Reports
Happy Thanksgiving from the eOne team!
2017 SmartConnect Integration Bootcamps
New Releases of Extender and SmartList Builder

CATEGORIES

TAGS

Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Meet the Team Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships partners Popdock release Reporting SalesForce SalesForce.com SmartConnect SmartConnect.com SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.