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 :
Finance | Project Operations, Human Resources, ...
Suggested answer

Automated loading of data into a scrolling window

(0) ShareShare
ReportReport
Posted on by 6

This is one for the Dex developers.

I have a scrolling window where users can enter a product number, the warehouse and the price per unit before moving to the next line.  Every product number is unique so no quantity is required. All very straight forward.

However, the user can also enter a special code into the product field that will then prompt for a product list number.  This is a predefined list of products.  Once they enter the list number, it will read the first product, display that in the scrolling window and then prompt the user for the warehouse and price.

Once these are entered, the user enters another special code to automatically add the remainder of the list to the scrolling window.  The screen automatically loads each product, warehouse and price based on the first line entered.

After each line is added, it should scroll to the next line.

My issue is that sometimes it does scroll to the next line and sometimes it doesn't and all of the products overwrite line 2 on the scrolling window.  The product lists are usually 100-200 lines in length.

What I cannot work out is why it isn't either consistently working or consistently failing.  I have tried running this with debug turned on and still it sometimes works and sometimes doesn't and there are no errors or obvious issues I can find.

Has anyone tried doing this before?  I know I can populate scrolling windows for display purposes easily but this needs to be interactive (it is an Adds Allowed window).  This is the list of commands we are using to force the window to move to the next line.  This is done after it loads the next product number onto the screen.

Window_PullFocus(window NewAssetEntryScroll); 
fill window NewAssetEntryScroll;
force changes window NewAssetEntryScroll; 
Window_ScrollScrollingWindow(window NewAssetEntryScroll, SCROLLTYPE_NEXT); 

Has anyone tried something similar to this before?  

I have a feeling I may have to rewrite the entire process to use a different method.  I have tried playing around with the script and generally it makes it worse.

Any ideas would be appreciated.

Mark

Categories:
I have the same question (0)
  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at
    RE: Automated loading of data into a scrolling window

    Hi Mark,

    I have worked on many scrolling windows and can help you. If you wish you can provide me your development  dictionary so I can review your code.

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,069 Most Valuable Professional on at
    RE: Automated loading of data into a scrolling window

    Hi Mark

    The Window_ScrollScrollingWindow() function needs you to current be focused on the previous line.

    You might need to use fill window from current and a focus statement or Window_SetFocus() beforehand to ensure you are in the correct position first.

    David

  • mavrick5au Profile Picture
    6 on at
    RE: Automated loading of data into a scrolling window

    Sorry Almas, that is not possible.

  • mavrick5au Profile Picture
    6 on at
    RE: Automated loading of data into a scrolling window

    Hi David,

    I thought it was odd they were pulling focus away from the scrolling window.  I will make the changes you suggested and test it again.

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,069 Most Valuable Professional on at
    RE: Automated loading of data into a scrolling window

    Pulling the focus ensures the scroll change script is executed to save the current line. But the should the focus back to the scrolling window then issue the command to move.

    If they are updating the contents of the scrolling window, they should use fill window with the from current and/or refresh keywords.

    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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 753

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 534 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans