Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Trying to add records to a scrolling window on DTA form

(0) ShareShare
ReportReport
Posted on by 50

I am trying to add records to the DtaPmTrxStatsDetailWindow.SwCodes scrolling window from a GPAddin form. The addin form has a combobox from which I will select the codeid. I then try to add the record to the scrolling window but, if I do not manually move my cursor to the first cell in the first line, the codeid and posting code description are dropped into the second line and disappear when I try to auto allocate or even move my cursor to the scrolling window.  See below for my code to add the data:

private void btnOk_Click(object sender, EventArgs e)

{

GPAddIn.PmTrxStatsDetailWindow.SwCodes.DtaCodeId.Value = cbRegion.SelectedValue.ToString();

GPAddIn.PmTrxStatsDetailWindow.SwCodes.DtaPostingDescr.Value = "test";

GPAddIn.PmTrxStatsDetailWindow.SwCodes.LocalCodeDescr.Value = cbRegion.SelectedText.ToString();

this.Close();

 }

 

I have tried using the various "line" events with no luck. Any help will be greatly appreciated!

 

My goal is to add the record to the scrolling window and cause the Auto Allocate button to click programmatically so the user will not do anything beyond selecting the codeid from the addin form.  I have not figured out how to click on a button in GP programmatically but my priority at this point is adding the record to the scrolling window.

Debi

*This post is locked for comments

  • soma Profile Picture
    24,410 on at
    RE: Trying to add records to a scrolling window on DTA form

    Currently I don't have the Visual Studio environment on my side. Give me some time, I will create the same and let you know the status.

    Hope this helps!!!

  • Debi J. Profile Picture
    50 on at
    RE: Trying to add records to a scrolling window on DTA form

    Soma, I am fairly new to writing these types of addins and appreciate your response.

    I will try your solution of writing the record to the table and then restarting the scrolling window but how do I restart it?

    Also, the button that I am looking at, PmTrxStatsDetailForm.TransactionStatsDetail.LocalAutoAllocate, does not have a change event associated with it. It only has clickAfterOriginal and ClickBeforeOriginal.

    Thanks,

    Debi

  • Suggested answer
    soma Profile Picture
    24,410 on at
    RE: Trying to add records to a scrolling window on DTA form

    Better you can add record to the attached table of scrolling window and then restart the scrolling window.

    To run the Auto Allocate button script, call the change event of the button.

    Hope this helps!!!

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans