Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Dev (Dexterity) - Run Change Script on Scrolling Window for Each Record

Posted on by 15

Hello,

Is it possible to loop through each record in a scrolling window and run the change script for a field? The basic use case is to allow the user to mark multiple deposits on the Select Bank Transactions window (Scrolling window Reconcile_Scroll on window CM_Reconcile_Selected_Docs of form CM_Reconcile). It seems possible as Microsoft has the standard solution to begin and end a range and then click the Mark button, but I don't know the correct syntax for this. I added a button to the form and have a basic testing script like this:

~~~~~~~~~~~~~~~

range clear table CM_Unreconciled_TEMP;
clear table CM_Unreconciled_TEMP;

'Marked' of table CM_Unreconciled_TEMP = false;
range start table CM_Unreconciled_TEMP;
fill table CM_Unreconciled_TEMP;
'Marked' of table CM_Unreconciled_TEMP = false;
range end table CM_Unreconciled_TEMP;

change first table CM_Unreconciled_TEMP;

while err(table CM_Unreconciled_TEMP) = OKAY do
  trxDate = 'TRX Date' of table CM_Unreconciled_TEMP;
  trxNum = 'CM Trx Number' of table CM_Unreconciled_TEMP;

  set 'Marked' of table CM_Unreconciled_TEMP to true;
  save table CM_Unreconciled_TEMP;

  // RUN CHANGE SCRIPT FOR '(L) Trx Marked' of window Reconcile_Scroll of form CM_Reconcile


  'Marked' of table CM_Unreconciled_TEMP = false;
  'TRX Date' of table CM_Unreconciled_TEMP = trxDate;
  'CM Trx Number' of table CM_Unreconciled_TEMP = trxNum;

  change next table CM_Unreconciled_TEMP;
end while;

~~~~~~~~~~~~~~~

Thank you.

Categories:
  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,915 Most Valuable Professional on at
    RE: Dev (Dexterity) - Run Change Script on Scrolling Window for Each Record

    Here is the second article which will be available after Wednesday 19th

    https://winthropdc.wordpress.com/2022/01/19/gppt-iterating-through-a-dexterity-scrolling-window-sample/

    This is a practical example with source code you can review.

    Regards

    David

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,915 Most Valuable Professional on at
    RE: Dev (Dexterity) - Run Change Script on Scrolling Window for Each Record

    Here is the first of two articles on the technique I developed.

    https://winthropdc.wordpress.com/2022/01/17/gppt-iterating-through-a-dexterity-scrolling-window/

    Enjoy

    David

  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,915 Most Valuable Professional on at
    RE: Dev (Dexterity) - Run Change Script on Scrolling Window for Each Record

    Yes. It is possible but needs some complex techniques.

    I only recently worked out how to do it after over 25 years of working with Dexterity.

    I will blog the techniques soon on http://WinthropDC.com/Blog 

    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,228 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans