I must first admit that I faced this issue (or may be flaw…!?!?!?!) only now after all these years of VS Tools development expertise.
The issue is this: I want to write a custom code on two events; SOP Entry Print Button and POP Entry Print Button. When I initialise the event method for SOP Entry Print Button, following is how it generates the code:
And the event method gets created as follows (if you use TAB to create the methods automatically):
After above, when I try to initialise an event method for POP Entry Print Button, following is how it generates the code:
When you try to press TAB to create the event method automatically, it takes you to previously created method.
Because, print buttons on both windows (SOP Entry & PO Entry) have same name technically, which is WindowPrint, VS Tools doesn’t understand both are from different windows and it just goes on to refer to one single method instead of two.
But you are not stuck there forever. Simple solution is to manually name your method initialisation with logical names, like below:
And like below:
Visual Studio Tools for Dynamics GP does not restrict you from using only names that it suggest.