Home » Listing Details
Top Websites
  1. Mark Polino's DynamicAccounting.net
    Over 3700 resources listed.
  2. Developing for Dynamics GP - By David Musgrave and the MS GP Dev Support Team
    Over 700 resources listed.
  3. Mariano Gomez at The Dynamics GP Blogster
    Over 600 resources listed.
  4. Mohammad Daoud's Dynamics GP Blog
    Over 400 resources listed.
  5. Microsoft Dynamics Partner Community Blog
    Over 400 resources listed.
  6. Vaidy Mohan at Dynamics GP - Learn & Discuss
    Over 400 resources listed.
  7. Dynamics GP Help
    Over 400 resources listed.
  8. Christina Phillips, Steve Endow & Lorren Zemke at Dynamics GP Land
    Over 300 resources listed.
  9. Frank Hamelly at GP2theMax
    Over 200 resources listed.
  10. About Dynamics, Development and Life
    Over 200 resources listed.
  11. eOne Business Solutions Blog
    Over 200 resources listed.
  12. Inside Microsoft Dynamics GP Official Blog
    Over 200 resources listed.
  13. VS Tools Forum
    Over 100 resources listed.
    Your Resource for Visual Studio Tools for Dynamics GP
  14. Inside Microsoft Dynamics GP Official Blog
    Over 100 resources listed.
  15. Janakiram M.P. at DynamicsBlogger
    Over 100 resources listed.
  16. Victoria Yudin's Dynamics GP Website
    Over 100 resources listed.
    Victoria Yudin
  17. Catherine Eibner MBS Developer Evangelist
    Over 100 resources listed.
  18. Sivakumar Venkataraman at Interesting Findings & Knowledge Sharing
    Over 100 resources listed.
  19. Dynamics CPM
    Over 100 resources listed.
  20. Dynamics Small Business
    Over 100 resources listed.
  21. Belinda, The GP CSI
    Over 100 resources listed.
  22. Rose Business Solutions Blog New
    Over 100 resources listed.
  23. Microsoft Dynamics GP UK Blog
    Over 100 resources listed.
  24. Leslie Vail at Dynamics Confessor Blogspot
    99 resources listed.
  25. Michael Johnson at MBS Guru
    96 resources listed.

ID:8955
Title:Visual Studio Tools LineFill Events
URL:http://blogs.msdn.com/developingfordynamicsgp/archive/2008/10/03/visual-studio-tools-linefill-event.aspx
Description:

David Meego

Developers using Visual Studio Tools for Microsoft Dynamics GP with forms that contain scrolling windows might have noticed that the LineFill events are missing from v9.0 and v10.0, this posting explains why they were missing and why they have been added back.

How Dexterity works 

Dexterity can display multiple records from a table at one time using a scrolling window.  Scrolling windows are used in lookup windows and many enquiry windows in BrowseOnly mode and also in transaction windows which have lines or distributions in AddsAllowed mode.

Scrolling windows have six events associated with them, these are the LinePre, LineChange, LinePost, LineFill, LineDelete and LineInsert events.  Dexterity can register triggers before and after the original scripts of these six events.  In Visual Studio Tools, we have the LineEnter, LineChange, LineLeave, LineDelete and LineInsert events that we can select to run BeforeOriginal or AfterOriginal, but there are no LineFill events.

Where did the LineFill events go? 

To understand why the LineFill events were not included, you need understand how the LineFill event works in Dexterity....

When a scrolling window is populated with the Dexterity fill window command, the system will move to the first record in the table range and execute the LineFill event, then it will execute the equivalent of a copy from table to window command to move the contents of the table record to the scrolling window line.  It will then read the next record from the table, execute the LineFill event, copy the data and so on until it either reaches the end of table or range (EOF) or completes filling the number of lines in the scrolling window.

When the LineFill event is executed, if there are scripts (or trigger scripts) associated, they will be executed. It is important to understand is the sequence or timing of the events. When the LineFill scripts are executed it is before the scrolling window fields have been populated.  This is so the code can prevent that record from showing with a reject record command if it needs to. 

If the script needs to populate any scrolling window fields from data in related tables, it must read the key values from the table buffer of the data read.  For example: If I read in a transaction with a 'Customer Number' field, I must use the value of 'Customer Number' from the table buffer to lookup the record in the RM_Customer_MSTR table to obtain the 'Customer Name' so I can populate the 'Customer Name' field on the scrolling window. A common mistake for new Dexterity developers is to try and read the data from the window itself and always get blank or empty values.

The Version History 

When Visual Studio Tools for Microsoft Dynamics GP was created for v9.00, it originally included the LineFill events.  However, as Visual Studio Tools did not support accessing of table buffers, these event would be completely useless as they could never obtain any information about the record about to be displayed.  So, a decision was made to remove the LineFill events before the final code was released.

When Visual Studio Tools for Microsoft Dynamics GP was updated for v10.00, the developers added support to allow access to form level table buffers.  This meant that the LineFill events could actual now work.  The issue was that no-one remembered to add the LineFill events themselves back to the tool.

This was quickly rectified for v10.00 Service Pack 1, which does support the LineFill events but it was not included in the documentation for Service Pack 1 or Service Pack 2.  With v10.00 Service Pack 3, we will have the events and the updated documentation as well.

I hope this explains everything for you. 

David

Category:DEVELOPMENT: VS Tools
Link Owner:
Date Added:June 17, 2010 02:12:22 AM
Number Hits:7
RatingsAverage rating: (0 votes)
Reviews

No Reviews Yet.

 
GPWindow.com

Developed and presented by
Smith & Allen Consulting, Inc.,
GP specialists since 1991.