Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

GP 2018 using C# to parse data grid using temporary tables

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

I am trying to streamline some C# code. I have code for cash management that works fine allowing the code to parse the grid on either the bank transaction screen or the bank inquiry screen.

                   CmDistributionTempTable CMDistTable;

 

                   if (WhichWindowOpen == "CmTransactionEntryForm")

                  {

                       CMDistTable = Dynamics.Forms.CmTransactionEntry.Tables.CmDistributionTemp; /* This points to the form table buffer for Cash Transaction Entry */

                   }

                   else

                   {

                        CMDistTable = Dynamics.Forms.CmTransactionZoom.Tables.CmDistributionTemp;   /* This points to the form table buffer for Cash Transaction Zoom(Inquiry) */

                   }

 

However, if I attempt to do the same thing with the GL transaction screen and the journal entry inquiry screen it does not work.

 

         GlDistributionTempTable GLDistTable;

 

         if (WhichWindowOpen == "GlTransactionEntryForm")

         {

           GLDistTable = Dynamics.Forms.GlTransactionEntry.Tables.GlTrxLineWork; /* This points to the form table buffer for Transaction Entry */

         }

         else

         {

        GLDistTable = Dynamics.Forms.GlJournalEntryInquiry.Tables.GlTrxLineWork;   /* This points to the form table buffer for Transaction Zoom(Inquiry) */

         }

 

I get a message about not being able to implicitly convert to the GlDistributionTempTable table. I think it has to do with the fact that there is no GLDistribution temp table. I have searched for other temp tables but the only one that exists does not work either.  Is there a way to get this technique to work?

*This post is locked for comments

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,209 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans