Can I customise a 3rd party form with Dexterity?
Over the last few weeks I have been asked a number of times about methods of customising a 3rd party form. This purpose of this post is to clarify what can and cannot be achieved with Dexterity.
Usually, the developer has created a combined dictionary as per the instructions in the Integrating with Third Party Dictionaries materials or KB 930350 . They then either:
- Attempt to modify the form in the combined dictionary and then either recreate a chunk or create a modified version of the 3rd party dictionary.
- Transfer the 3rd party into their dictionary, modify it and then attempt to get the modified form used as an "alternate" version of the original.
The problem is that method 1 is in breach of the license agreement and the changes will probably be lost if a service pack or hot fix is applied; and method 2 just does not work as Dexterity does not support alternate versions of 3rd party forms.
Note: There is a section in the "Integrating" conference materials on Modifying 3rd party forms. The method discussed is not recommended as it breaches the Dexterity License agreement (not allowed to ship a modified application dictionary) and also causes problems when applying upgrades and service packs. The later "Pushing" materials contain a Warning about modifiying 3rd party forms to explain some of the issues.
In summary, there is no supported method of using Dexterity to directly modify a 3rd party form.
Depending on the changes needed to the 3rd party form there are other methods available.
For example:
- If you do not need to change the window, but need to run scripts when various events happen in a 3rd party product; you can use cross dictionary triggers of the form Trigger_RegisterXXXXByName().
- If you want to add a new navigation to a 3rd party form to an additional window or task, you can use Trigger_RegisterFormByName() to add to the Extras menu. You can also add a shortcut key to allow a keyboard shortcut to open the additional window or perform an additional task in your dictionary.
- If you want to make a new window open automatically, you can use either form, window or field focus events to open your window with the Trigger_RegisterFocusByName() command.
All these examples can be achieved using cross dictionary triggers from your own dictionary.
If you really need to add a new field, you will need to use one of the following methods:
Using Dexterity: Create a parallel synchronised window to allow the adding of the additional fields. A parallel synchronised window is a window in your dictionary which opens and closes with the 3rd party window and uses cross dictionary triggers to stay synchronised on the same record. It displays, deletes and saves its data in a parallel or companion table along with the original data. A parallel table has the same primary key fields as the original, along with the additional new fields.
Using Modifier and VBA: Add a local field to a modified version of the 3rd party window and store its value in the DUOS (Dynamic User Object Store). You can then use cross dictionary Dexterity triggers to read the data from the SY_User_Object_Store (SY90000) table when needed. See the Modifier - Sales Prospect DUOS Example for more information.
Note: If you are just adding a button for navigation and need it to run Dexterity code, you could use SendKeys to drive the menus to your Extras menu added with a cross dictionary form trigger. You could also use the unsupported method of running Dexterity sanScript via the Continuum Integration Library. See the materials from the Microsoft Dynamics GP Technical Airlift 2008 for more information. Using the pass through sanScript method allows you to specify the context of the dictionary to run the code in.
Method 1 allows the customisation to stay completely with Dexterity which is an advantage, but the user interface is spread between two windows. Method 2 is better from the user interface perspective as the new field can be in the same window, but relies on Modifier and VBA for part of the customisation.
Note: You can use Modifier modify the window and then use Visual Studio Tools to create the scripting rather than VBA. You will need to use the DAG.EXE tool to create the assembly to address the modified version of the window.
In my opinion, if the customer is registered for Modifier and VBA (or the Customisation Site License), using the hybrid method 2 will provide the best solution for the customer.
David
11-Jun-2009: Added note about using Visual Studio Tools rather than VBA for scripting.
24-Nov-2010: Updated post to highlight that direct modification of a 3rd party form is against the Dexterity license agreement and is not recommended.
Comments
Anonymous
November 10, 2008
G'Day David, Can I add an extender window to a 3rd part product like wennsoft. Cheers paulAnonymous
November 10, 2008
Hi Paul Extender can be used against any product. Extender windows are Dexterity Parallel windows as described in the article. The only difference is that it is coded for you rather than you writing the code yourself. DavidAnonymous
November 10, 2008
Thanks David, I've created two additional extender windows to the sales transaction entry screen.Is it possible to link these two windows into one report using report writer. Cheers PaulAnonymous
November 10, 2008
Hi Paul The following KB article explains how to use Report Writer functions to get Extender Fields onto a modified report. https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;en-us;935385 DavidAnonymous
February 13, 2009
Our requirement is to add a computed field in a third party window (which is actually an alternate window in GP - SOP Entry). This computed field is for display only and does not neeed to be saved. How can we achieved this without using VBA? Thank you.Anonymous
February 13, 2009
Ireland Developer, As the post mentions the ONLY way that you are going to add a field to a 3rd party window is using Modifier. There isn't any other way currently to add a field to 3rd party form otherwise. Now how you want to maintain that field, you do have a couple options:
- use VBA as this post suggests
- you could use VSTools code to maintain your field But the key point is that adding a physical field to a 3rd party window requires Modifier. patrick dev support
Anonymous
November 19, 2009
Thank you David for making it clear. I actually got shocked when I knew about this limitation in Dexterity products. But I wonder if there's any unsupported method to modify a 3rd party window in Dexterity and chunk it along with the rest of the customizations as it's impossible and not acceptable to do our customizations in modifier and distribute the modified dictionary (We're working on SVCADV.dic) to the customer. Best Regards. Malek.Anonymous
November 19, 2009
Malek, Actually what is not acceptable is modifying a 3rd party dictionary or taking 3rd party windows and including them in your Dexterity customization. While this might be sort of possible to make work, any kind of upgrade is impossible. And of course is completely against the Dexterity license agreement. The methods for working with a 3rd party dictionary are the true, correct, and legal methods. regards patrickAnonymous
November 19, 2009
Hi Malek There was a method proposed in the Integrating with Third Party Dictionaries materials. It required the use of Dexterity to modify a combined dictionary for the 3rd party product and then transfer the modified form to an extracted dictionary. No code was changed, just existing global or local fields could be added. You can then use cross dictionary triggers to add your code. This method was recommended against as it is in breach of the License agreement which says you cannot ship a modified dictionary. Also, it will be overwritten when a service pack or hotfix is installed. While this method is technically possible, it is illegal, unsupported and hard to maintain. I suggest you ship a package of a modified form. DavidAnonymous
November 20, 2009
Thank you David. Thank you Patrick. Let me give a real example to make sure I understand what you've said. It's the SVC_RMA_Entry_DropDown window from SVC_RMA_Update form, can I do the following? 1- Add a button to the window using Modifier, and write OnChange code for the added button in my dictionary by using cross dictionary triggers? 2- Let's take the illegal method (just to understand every method). If I transferred the form to my dictionary and added a button with its OnChange code, how would I tell GP to open that form/window from my dictionary rather than opening the original one? Thank you. Malek.Anonymous
November 21, 2009
- No. Dexterity cannot see the button added with modifier.
- No. No. No. No. No. And no. With the methods discussed here using Mod/VBA or Mod/Vstools or Mod/Continuum or even Mod/VBA/Dexterity there is no reason at all to even have this conversation about modifying a 3rd party dictionary with Dexterity. Period. It is a bit of extra work making a hybrid solution (if you even need to - vstools or vba should be enough) but the headache of doing this (ignoring the whole against license agreement thing) more than makes up for the potential extra work.
Anonymous
November 22, 2009
Hi Malek You can only have an alternate window of an original Dynamics.dic form. There is no mechanism to have alternate (ie. Dexterity modified) windows of a 3rd party product. You will NEVER be able to have a copy of a 3rd party window in your dictionary and make it work. Please use the methods that are available to you. Either use modifier to change the original window or add a parallel synchronised window. These methods where demonstrated at the recent Technical Conference in Fargo. See materials attached to: http://blogs.msdn.com/developingfordynamicsgp/archive/2009/11/11/microsoft-dynamics-gp-technical-conference-2009-day-1.aspx DavidAnonymous
May 18, 2012
Hi David, Do you have an example of a parallel synchronised window that exists in production code? Also, is it possible to make this new window look like it is "attached" to the main window so if the user moves the main window the additional window would move with it? Thanks!Anonymous
May 26, 2012
Hi Terry I don't have an example available for download. You just need to use triggers on all the relevant events. Window Open and Close. Display Existing Record, Save Record, Delete Button, Clear Button, Window Pre. You can read window position and open your window next to the other window. You can't capture the Window being moved, but you can re-position your window using the Window Activate event on the main window to trigger on. Hope this helps. DavidAnonymous
August 03, 2014
Hello David, It is a friendly question and your answer is much appreciated. I am MC Dynamics GP developer. I have the same situation, I need to add a new field into a 3rd party dictionary and I like you answer about adding a parallel synchronized window which opened when the desire form is opening. I tried to do the trigger which allow me to do that but nothing works. I need to show a message when “window SVC_Contract_Line_Invoice_View of form SVC_Inquiry_Contract_Entry” in SVC dictionary opened. Here is what I did: On the Startup I wrote: local integer l_result; l_result = Trigger_RegisterFocusByName(949, "window SVC_Contract_Line_Invoice_View of form SVC_Inquiry_Contract_Entry", TRIGGER_FOCUS_PRE, TRIGGER_AFTER_ORIGINAL, script csSVC_Message); if l_result <> SY_NOERR then warning "Focus trigger registration failed."; end if; “csSVC_Message” Code: warning "Hi"; I don’t know what I miss. Would you be able to send me a full example of how to use parallel synchronized window technique. Really appreciate your help.Anonymous
August 04, 2014
HI Hany The code looks correct. Maybe you should test against the main window and see if that works. I suggest if you need further assistance to log a support case as the blog comments are not a suitable platform for support. I will look at doing a parallel window example sometime. Thanks DavidAnonymous
April 07, 2015
Hello David, One of our client asked to add additional field on aaPOPTrxInquiry window (Trx Code Description). I can't do that using Modifier with VBA/VST as that window has list view control. I need to add Trx Code Description to list view control. Basically I need to populate that value based on Trx code which is not possible using Modifier with VBA/VST. SO, I guess my only option here is to modify using Dex. So, can I write cross dictionary triggers in order to achieve this requirement as this form is part of Analytical Accounting dictionary. Do you have any articles/examples for this? like adding fields in list view control which is part of third party dictionary? Thanks in advance for your help Thanks SreelathaAnonymous
April 09, 2015
The comment has been removedAnonymous
April 16, 2015
Thank you so much David.Anonymous
January 07, 2016
How come method 1 is in breach of the license agreement if you are not actually doing the below mentioned activities
- modifying the code. like code of Service Call Entry Window.
- modify or distribute the source code of any Distributable Code( Field Service)
- Reverse engineer, decompile or disassemble the software. 4 transfer the software or this agreement to any third party. 5.create a modified version of the 3rd party dictionary.
- Anonymous
January 28, 2016
Hi Almas The method 1 refers to the paragraph above which is "1. Attempt to modify the form in the combined dictionary and then either recreate a chunk or create a modified version of the 3rd party dictionary." That is in breach of the license agreement as it is creating a modified version of a 3rd party dictionary. Using a Dexterity parallel window does not breach the agreement. David