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.
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
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..
}
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.
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
So it does not change depending on whether you are zooming back to an open document or an historical document?
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.
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.
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?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156