Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Re-Sort POP Receivings Transaction Line Scrolling Window?

(0) ShareShare
ReportReport
Posted on by 289
Here is my quandary. We are receiving in GP some shipping documents which contain lots of line items. The goal is for the received items to be ordered as they appear in the physical shipping document. These shipping documents are consistently ordered by the Item Number. When our endusers go into GP they are doing Auto-Rcv and choosing to sort by Item Number/PO. I would assume that this would allow them to receive the items in Item Number order. But when they have completed their auto-receiving the items populate in the line scrolling window in PO number order instead. For now the workaround is for our endusers to Auto-Rcv one item at a time, in Item Number order. That's the only way we can end up with the line scrolling window in the correct sequence. I have used Dynamics GP VST 2010 for other functions going back a few years. And found it helpful. Anyone have sample code or a steer in the right direction for my being able to create a routine where the endusers can auto-receive, end up with their complete item list, and then hit a function to re-sort the line scrolling window in Item Number order? Otherwise we have the clunkier one-at-a-time auto-receiving or else have trouble matching up physical items against the physical shipping documents. Please let me know any suggestions. Thanks!

*This post is locked for comments

  • Verified answer
    Greg Kujawa Profile Picture
    Greg Kujawa 289 on at
    RE: Re-Sort POP Receivings Transaction Line Scrolling Window?

    Thanks again for leading me down the right path. The issue I ran into was I couldn't renumber the existing base-16384 receipt line numbers. There would be key errors and GP wouldn't reflect anything other than the original receipt line order.

    I opened a ticket with Microsoft GP developer support and a helpful manager provided me a T-SQL script that did the trick. I'll paste it below. Invoking this script through a Dynamics.Forms.PopReceivingsEntry.PopReceivingsEntry.LocalReturnToExpansion.ValidateBeforeOriginal() event handler completed the requirement. Appreciate your time and feedback!

    declare @oldseq int

    declare @newseq int

    --find the max sequence in use

    select @newseq = max(RCPTLNNM) from POP10310 where POPRCTNM = 'RCT1166'

    -- select our existing line sequences where the line number is less than our

    -- max sequence.  have to do this as i'm getting into an infinite loop

    -- as the cursor seems 'live' and we keep getting the same record

    declare itemcursor  cursor for

     select RCPTLNNM from POP10310 where

         POPRCTNM = 'RCT1166' and

         RCPTLNNM <= @newseq order by ITEMNMBR

    open itemcursor

    FETCH NEXT from itemcursor into @oldseq

    while @@FETCH_STATUS = 0

    BEGIN

         set @newseq = @newseq + 16384

         update POP10310 set RCPTLNNM = @newseq

               where POPRCTNM = 'RCT1166' and RCPTLNNM = @oldseq

         FETCH NEXT from itemcursor into @oldseq

    END

    close  itemcursor

    deallocate itemcursor

  • Suggested answer
    soma Profile Picture
    soma 24,410 on at
    RE: Re-Sort POP Receivings Transaction Line Scrolling Window?

    After received the orders from Select Purchaser Orders window, GP will insert the values to the Purchasing Receipt Line table and fill it to Receiving Transaction Entry scrolling window. So, if you want to re-fill the values with desired sorting orders, you need to re-populate the values to the tables and fill it again. This is common logic for all tools.

    Hope this helps!!!

  • Greg Kujawa Profile Picture
    Greg Kujawa 289 on at
    RE: Re-Sort POP Receivings Transaction Line Scrolling Window?

    Thanks for the quick reply! I just wanted to clarify that this isn't something coded as part of my standard GP Add-In I rely on for customization. That was developed using VST 2010. Your example is using Dexterity? Not to be ignorant, but how do I utilize this toolset? All I've used in the past is VST 2010...

  • Suggested answer
    soma Profile Picture
    soma 24,410 on at
    RE: Re-Sort POP Receivings Transaction Line Scrolling Window?

    The Sort By option is only used for the Select Purchase order window. Because this sort options is help us select the purchase orders with different sorting options. Receiving Transaction Entry window won't consider this sort options.

    If you want to re-sort the original filled values from Receiving Transaction Entry Scrolling window, you can use Dexterity to clear the scrolling window and set the range (appropriate receipt number from header value) then run the fill window command for key field 2(This key field has the sorting option from item number, receipt number and receipt line number).

    Ex: fill window line_scroll of form POP_Receivings_Entry by number 2;

    But, I would not recommend for breaking standard GP functionality.

    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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans