web
You’re offline. This is a read only version of the page.
close
Skip to main content
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

I have the same question (0)
  • 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!!!

  • 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

  • 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!!!

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans