Accessing tables
A table buffer provides access to one row of a specific table. Your code will interact with the table buffer when you perform operations on the table. There are two types of table buffers: global and form-level.
Global table buffers
A global table buffer is created when a table is accessed directly through the global list of tables. Global table buffers are accessed through the dictionary class. This class has a Tables property that provides access to the collection of tables defined in the dictionary. The dictionary class for the application dictionary is located in the following namespace:
Microsoft.Dexterity.Applications
For instance, to access the collection of tables in the Dynamics dictionary, use the following syntax:
Microsoft.Dexterity.Applications.Dynamics.Tables
To access a specific table, such as the RM_Customer_MSTR table (RmCustomerMstr), use the syntax shown below. (This example assumes the namespace mentioned above has been referenced.)
Dynamics.Tables.RmCustomerMstr
Hint: The IntelliSense in Visual Studio will tell you what table in Microsoft Dynamics GP is being referred to by the expression.
By default, a global table buffer for a table is shared with all of the other Visual Studio Tools add-ins that are accessing that same table. If you want your integration to create a global table buffer that is not shared, use the Clone() method when creating the instance of the global table buffer.
Form-level table buffers
A form-level table buffer is created when a table is attached to a form in Microsoft Dynamics GP. There is one table buffer for each table that is attachd to the form. Each form-level table buffer is shared by the code that is part of the form, as well as any code outside of the form that accesses the table through that form. The Tables property for the form allows access to the table buffers for the tables that are attached to the form. For example, to access the form-level procedures for Sales Transaction Entry Form (SopEntryForm) in Microsoft Dynamics GP, you would use the following syntax:
Dynamics.Forms.SopEntry.Tables
Hint: The IntelliSense in Visual Studio will tell you what form-level table in Microsoft Dynamics GP is being referred to by the expression.