Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP forum
Suggested answer

Dexterity - change sort order of documents in Apply Sales Documents to by Due Date

Posted on by 21
A customer needs the Apply Sales Documents window to display the invoices and debit memos in the scrolling window sorted by Due Date instead of by Document Number.  There was an article by David Musgraves that addressed this, but it is 20 years old and seems to no longer apply.  I believe the grid is filled from a temp table that only has one key on it.  I see another thread here, but no answer stating if this is possible or not with Dexterity.  Any assistance is greatly appreciated!
Grid Sort Order - Microsoft: Dynamics GP (Great Plains) - Tek-Tips
  • Suggested answer
    CU09101428-0 Profile Picture
    CU09101428-0 4 on at
    Dexterity - change sort order of documents in Apply Sales Documents to by Due Date
    I have responded and sent you the code.
     
    The article will be live after the 13th Oct 2024.
     
     
    Regards
     
    David
  • DiannFariss Profile Picture
    DiannFariss 21 on at
    Dexterity - change sort order of documents in Apply Sales Documents to by Due Date
    Thanks David -
    I just saw your reply and have sent you an email directly!
    Let me know if you don't get it...
    Diann
  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,837 Moderator on at
    Dexterity - change sort order of documents in Apply Sales Documents to by Due Date
    Hi Diann
     
    Never say Never.
     
    I have recently written a customization against that the Apply Sales Documents window using GP Power Tools with Virtual Fields.
     
    This customization filters the table based on the Current Trx Amount. Our first attempt did not work as the temporary table only has the minimum fields it needs populated.  If you look at the temporary table at the SQL level, the Due Date, Document Date and most of the other fields are not populated.
     
    You would need to run a SQL update statement on the RM_OPEN_TEMP table joined to the RM_OPEN table to populate the additional fields. Then the virtual key will work.
     
    I am going to create this functionality by extending the custom example I already have for the window and add a Virtual Field drop down list to the window to allow you to sort by Document Number, Document Date and Due Date in addition to the filtering options already added to the find window.
     
    This GPPT example will be posted as a free sample on 13th, but if you email me directly, I can send it to you earlier.
     
    Kind regards
     
    David
  • DiannFariss Profile Picture
    DiannFariss 21 on at
    Dexterity - change sort order of documents in Apply Sales Documents to by Due Date
    David -
    Here is what I got back from my programmer:
     
    "Same results, it appears that you cannot assign a virtual key to the temp table and have it sort by that.  I tried it exactly as he described even making sure that the code is being called correctly and clearing and refilling the window by logging the scripts.   Tried defining the key even on different fields and it has no affect on how it fills the window.  At this point I am going to say it can’t be done."
     
    Let me know if you think there is something that we missed or if there is another way to approach this.
    Thanks for your help!
    Diann
     
  • DiannFariss Profile Picture
    DiannFariss 21 on at
    Dexterity - change sort order of documents in Apply Sales Documents to by Due Date
    David - Thanks for this!  I have passed it on to my programmer and will update here if we were able to make it work!!
    Diann
  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,837 Moderator on at
    Dexterity - change sort order of documents in Apply Sales Documents to by Due Date
    I love that in 2003 I said "Dexterity has "at least" nine years of life ahead of it.... and that is a really long time in the IT world."
     
    I was wrong it had at least 25 years.
     
    Your developer is correct, this window has changed since that article was written.
     
    You would need a different method. 
     
    A Trigger after the Form Procedure rmPopulateRMOpenTempTable of form RM_Cash_Apply, with parameters:
    in        'Customer Number'    sCustNo;
    in        'RM Document Type-All'    nCrdDocType;
    in        'Document Number'    sCrdDocNo;
    in        boolean    fAutoApplyNA;
    inout    table                RM_OPEN_TEMP;
    out        integer                oErrorStatus;
     
    This will give you access to the table RM_OPEN_TEMP.
     
    You can then use the assign as key command to create a virtual key on the fields you want and fill window as you want. Store the key as a global variable.  You can then check it and avoid creating multiple virtual keys.
     
    Then a trigger after RM_Apply_Document l_FillWdw_CHG will allow you to fill the window using the virtual key stored in the global variable.
     
    The code in the RM_Apply_Document l_FillWdw_CHG which calls rmPopulateRMOpenTempTable of form RM_Cash_Apply actually does something similar if using national accounts.
     
    if fAutoApplyNA and NationalAccountsRegistered() then
        assign nKey as key for table RM_OPEN_TEMP using 'Corporate Customer Number' of table RM_OPEN_TEMP, 'RM Document Type-All' of table RM_OPEN_TEMP,
        'Document Number' of table RM_OPEN_TEMP, 'Email Type' of table RM_OPEN_TEMP;
        fill window RM_Applied_Document_Scroll by number nKey;
    else
        fill window RM_Applied_Document_Scroll;
    end if;
     
    The user might see a flicker as the window will fill twice, once by the original code and once with your trigger.
     
    Good luck.
     
    David
     
  • DiannFariss Profile Picture
    DiannFariss 21 on at
    Dexterity - change sort order of documents in Apply Sales Documents to by Due Date
    David - Thanks for jumping in here!  My dexterity programmer has informed me that it does not.  He is stating that the grid uses a temp table with just one key on it.  Based on the article we had let the customer know we could do it so am anxious to make it work and get my programmer what he needs to do it!  
    Diann 
  • Suggested answer
    Lisa at AonC.com Profile Picture
    Lisa at AonC.com 3,030 on at
    Dexterity - change sort order of documents in Apply Sales Documents to by Due Date
    If the client is using auto-apply, have you tried the Apply by Due Date option in Receivables Management Setup?



    [For one of our clients who has many, many transactions per a single payment and not always with a specific document date or due date logic, we use TitaniumGP to copy out the contents of the Apply Scrolling window, paste the data in an Excel template where they flag which transactions to apply.  Once the apply information is noted in Excel, TitaniumGP is then used to paste the selection back into the Apply Sales Documents window. www.titaniumgp.com]
  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,837 Moderator on at
    Dexterity - change sort order of documents in Apply Sales Documents to by Due Date
    Without actually trying to make the changes as described in the Tek Tips article, I am pretty sure the technique will still work.
     
    Is there a reason you say it does not apply?
     
    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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,572 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,706 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Product updates

Dynamics 365 release plans