web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Get data tables names associated with a grid?

(0) ShareShare
ReportReport
Posted on by 75,848 Moderator

Is there any way to get the name of the data table associated with a grid on screens? For example, I go to Inquiry->Sales->Transactions but Customer. I enter a customer and then highlight a document. I then zoom to the document and then click on Distributions. On the screen will be a grid with the distributions. I believe what is behind that grid is called a data table.  Sometimes when am I coding in C# the names that pop up are somewhat misleading. Using Forms Modifier does not tell you the object name. Is there is a programmer's reference to those names that would be great to know how to obtain that reference.

Categories:
I have the same question (0)
  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    I don't think there is a programmer reference for that.

    In VSTools tables and forms name appear little different but can be guess with their name.

    Which table you want to confirm the name in VSTools?

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    I am trying to confirm the RMDistributionHistTable and not RMDistributionWorkTable off the RM Inquiry screen when zooming on an open or historical document. What brought this up is a loop I have on the grid. I have loops on many other grids but for this one, for some peculiar reason, when I loop the sequence numbers go 16384,32768,16384,32768 on and on forever and it never exits. You will see my code in a previous post.

  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    If you want to know the table attached with the zoom scrolling window, then it is actually RM_Distribution_Work table and in VS it's RmDistributionWork.

    If you are talking about this window.

    distWindow.png

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    So it does not change depending on whether you are zooming back to an open document or an historical document?

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    Hi Richard

    Technically, this is a Dexterity Scrolling window which is represented as a Grid in VBA and .Net, but does not behave much like an actual Grid.

    You can use Dexterity (or the GP Power Tools Resource Information window) to get a list of the tables associated with a form.

    I would suggest using the Dexterity Script Profile to identify the tables associated with a scrolling window. This table should show as multiple read events in the Script Profile as the data is displayed in the scrolling window.

    To capture the log, there are a heap of manual steps, but just using GP Power Tools Manual Logging is the simplest method. Just start before the window is opened and stop after the window has opened and the scrolling window has been filled.

    Remember that it is possible in code to change the table used and sometimes temporary tables are used. For example: Work/Open/History tables, or a temp table combining all three.

    Hope this helps

    Regards

    David

  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at
    [quote user="Richard E Wheeler"]

    So it does not change depending on whether you are zooming back to an open document or an historical document?

    [/quote]

    Attached table don't get changed but with the dexterity code we can make grid /scrolling window fill with other table instead of the linked table.

    SO  you have to add more lines of code to switch b/w the tables for open and historical documents.

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    Do you know I can find documentation on commands for these data tables within a scrolling window.  I used to have if but I can no longer find it. I want to research fine tuning some of my code. I am looking for documentation on commands such as the ones below.

                           Microsoft.Dexterity.Applications.DynamicsDictionary.RmDistributionHistoryTable RMHistDistTable;

                           /* This points to the form table buffer */

                           RMHistDistTable = Dynamics.Tables.RmDistributionHistory;

                           RMHistDistTable.Key = 1;

                           RMHistDistTable.Clear();

                           RMHistDistTable.RangeClear();

                           RMHistDistTable.DocumentNumber.Value = VoucherNumber;

                           RMHistDistTable.RangeStart();

                           RMHistDistTable.Fill();

                           RMHistDistTable.DocumentNumber.Value = VoucherNumber;

                           RMHistDistTable.RangeEnd();

                           err = RMHistDistTable.GetFirst();

                           while (err != TableError.EndOfTable)

                           {

                               Do stuff..

                           }

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    Hi Richard

    These are the Visual Studio equivalents of setting an Indexed range in Dexterity.

    Look in the Visual Studio Tools for Microsoft Dynamics GP Programmers Guide, Chapter 9

    "C:\Program Files (x86)\Microsoft Dynamics\GP2018 VS Tools SDK\VSTDGPProgrammersGuide.pdf"

    You could also look in the Dexterity manuals

    https://winthropdc.wordpress.com/training/

    Here are some articles as well:

    https://winthropdc.wordpress.com/2018/02/21/dexterity-future-proof-range-setting/

    https://winthropdc.wordpress.com/2018/02/26/dexterity-well-behaved-ranges/

    Regards

    David

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans