Open Forum

Expand all | Collapse all

SOP Line Items - Running out of Line Item Sequence (cannot add line items)

  • 1.  SOP Line Items - Running out of Line Item Sequence (cannot add line items)

    Posted 17 days ago
    Hey Fellow GPUG Members!

    I'm just wondering if someone knows of an existing stored procedure (routine) to auto-renumber line item sequences in SOP.
    I have a customer who adds dozens of line items to existing orders.
    If you glance at the blog post my friend (and GPUG All Star) @Mariano Gomez wrote over a decade ago (and @David Musgrave added to), if you add more than 14 items into the same spot, you get a message saying you can't add any more.


    https://dynamicsgpblogster.blogspot.com/2008/07/scrolling-windows-and-line-sequence.html 


    I realize the user can just move down the order and add items, but they want them in a specific order.

    So - is there a simple way of renumbering the rows?  I know if you 'copy', the order to another order it will renumber the lines, but they don't want to do that.

    We do have companion tables that we've developed for them, so any stored procedure will need to be updated to include our tables AND Key2Act tables, but just thought I'd ask if there is already a quick resolution instead of starting from scratch.  I realize we probably just need to add all items to a temp table, renumber, and copy back.

    Thanks in advance for your help :)
    ​​

    ------------------------------
    Abra Gilman
    GP Practice Lead
    Collins Computing, Inc.
    Dynamics GP ERP Partner
    Bend, Oregon (Headquarters in Southern California)
    www.collinscomputing.com
    ------------------------------
    GPUG Summit - Post


  • 2.  RE: SOP Line Items - Running out of Line Item Sequence (cannot add line items)

    TOP CONTRIBUTOR
    Posted 14 days ago
    Your idea I think is the only solution.
    16384 = 2**14, or 2 to the 14th power.
    In the temp table simply have the prior sequence number,
    sort by the sequence number, and have the new sequence number incremented by 16384.
    That way you can quickly replace in all tables that link to it.
    The only link table I remember that might be involved would be the POP-SOP link table IF you generate PO's from your sales orders.

    ------------------------------
    Bruce Strom
    Programmer Analyst
    Associated Grocers of Florida / Supervalu
    Sunrise FL
    ------------------------------

    GPUG Summit - Post


  • 3.  RE: SOP Line Items - Running out of Line Item Sequence (cannot add line items)

    GPUG ALL STAR
    Posted 14 days ago
    Hi Abra

    Based on this discussion thread I am looking to create a GP Power Tools custom script which will perform the re-numbering and will work for all tables in the database that have the key field columns.

    I will post the configuration file for anyone to use on my blog once completed.

    Regards

    David

    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------

    GPUG Summit - Post


  • 4.  RE: SOP Line Items - Running out of Line Item Sequence (cannot add line items)

    TOP CONTRIBUTOR
    Posted 14 days ago
    Once again, @David Musgrave comes to the rescue!​

    ------------------------------
    Bruce Strom
    Programmer Analyst
    Associated Grocers of Florida / Supervalu
    Sunrise FL
    ------------------------------

    GPUG Summit - Post


  • 5.  RE: SOP Line Items - Running out of Line Item Sequence (cannot add line items)

    Posted 13 days ago
    ..if you 'copy', the order to another order it will renumber the lines, but they don't want to do that.

    Our orders have hundreds of lines and users sort them into like groupings. Everything stays on one order, no splitting. We have a fair amount of line insertion/deletion activity.

    Subtle difference from the OP but maybe worth mentioning. Our users copy the lines, delete them from the existing order and paste back into the same order. This line renumbering approach may alleviate user woes if creating a different order is the friction.

    Some of our users instead copy the lines, paste them below the original order lines and then delete the original lines. This method works for users nervous seeing all the order lines disappear to an invisible clipboard. This approach carries the risk of introducing duplicated order lines if they miss that last step.

    Would be nifty if lines were auto-renumbered on row insertion operations.

    ------------------------------
    Brad Smith
    SE Retail
    Fountain Inn SC
    ------------------------------

    GPUG Summit - Post


  • 6.  RE: SOP Line Items - Running out of Line Item Sequence (cannot add line items)

    GPUG ALL STAR
    Posted 12 days ago
    Hi all

    I have created the GP Power Tools project that will allow manual renumbering from the Additional menu on Sales Transaction Entry form, or from the application level Sales >> Utility menu.

    It will also intercept the error dialog and replace it with an offer to renumber the lines.

    It should work with all core Dynamics, Microsoft addon product and ISV addon product tables in the company database.

    The article will be live tomorrow morning with the configuration file to download.

    https://winthropdc.wordpress.com/2019/06/06/gppt-renumbering-sop-transaction-lines/

    If you don't have GP Power Tools, just install it and activate the free 30 day trial period.

    Note: The application level menu needs the free Visual Studio Integration Toolkit installed.

    Enjoy

    David

    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------

    GPUG Summit - Post


If you've found this thread useful, dive deeper into User Group community content by role