Site Search:
Sign in | Join | Help

New to Visual Studio Tools for GP

Last post 08-29-2007 8:37 AM by Steve Gray. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-27-2007 6:04 PM

    New to Visual Studio Tools for GP

    I am new to VST and need some help understanding what possibilities exist.  In particular, is it possible to modify the UI of a GP screen (for example, the SOP window) by utilizing the VS Tools?  If so, can anyone point me in the right direction?

     Thanks in advance...

    • 66.109.245.210
  • 08-28-2007 9:08 AM In reply to

    Re: New to Visual Studio Tools for GP

    You are asking for a lot... let me take it in steps.

     You use Modifier to make visual modifications to Dynamics (From Dynamics click on TOOLS > CUSTOMIZE > MODIFY THIS FORM). You'll need an extra license for that. In the past, we would use VBA to attach code to windows and handle events. VS Tools has replaced that. Now you can write .NET code against Dynamics forms and modified forms. Much, much, much more flexability.

    For your 'hello world', just follow the Microsoft Install and Programmers guide docs (let me know if you don't have them - they come with the VS Tools install).

    After you go through that, if you have questions just ask, I'll help.

    Also - this is important - you should document what you learn and post it on this forum. Help the community...

    Thanks!

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    Filed under:
    • 72.185.100.232
  • 08-28-2007 7:19 PM In reply to

    Re: New to Visual Studio Tools for GP

    Steve,

     Thanks so much for the response.  While I have Modifier/VBA experience, I don't have Dexterity or VSTs and just was not sure where to start.  (Preferably not with Dex!).

    Our client would like to be able to "discard changes" on a SOP transaction window.  Due to the way the SOP windows work, this is challenging to achieve so I am trying to evaluate whether or not the VSTs approach helps me or not.  The basic thought process that I had was that when the customer opened an order, the event would trigger a function to copy the order into staging tables.  If, during the course of editing the order, the custoemr wished to go back to the original, they would click a button to revert back to the prior version.  This would delete the order in its current state and replace it with the order in the staging table(s).

     Does this sound like a valid solution that could be achieved utilizing VSTs?

    Thanks in advance for your time.  There is so little to work off of with this tool that it is a comfort to know this forum exists!

    • 66.109.245.210
  • 08-29-2007 8:37 AM In reply to

    Re: New to Visual Studio Tools for GP

    This is a tricky task, I'm not sure that it can be done with the form open.

    My gut would be to copy the data from the SOP10100 and SOP10200 into a staging table, like you said. However, when you close the form, Dynamics will save the form data to the SOP tables. So, if you want to 'discard', you have to copy the the staged data to the form, not the underlying tables. That way the form will save the staged data back.

     

    Another however, and a big one: There is no way to restore the grid (scrolling window). If it started with two lines, you changed one and deleted one and added one, there is no way to get back to that state on the form, the tools are not available. Microsoft is hinting that it may be available in 10, we'll see.

     

    So, here's what I'd do:
    Copy the data to staging tables. Put a button the form that says 'Discard Changes'. Have the form close (by pushing the 'save' button in code) and then restoring the data in the tables via SQL statements.

     

    This is the code that I use to close the SOP Entry form:

    'save the current form. The form will go blank
    sopWind = Dynamics.Forms.SopEntry.SopEntry
    If sopWind.SopNumber.Value > "" Then
        sopWind.SaveButton.RunValidate()
    End If

    HTH

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • 72.185.100.232
Page 1 of 1 (4 items)