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 :
Microsoft Dynamics GP (Archived)

"You cannot insert a row" at sales transaction window

(0) ShareShare
ReportReport
Posted on by 120

I was trying to add an item between an existing sales order and "You cannot insert a row" error pops up. I have tried to check for any security related issue so I've logged in as "sa" and still shows up.

However, I can add an item at the top or the bottom. When I do add an item or two or even replacing an item my, packing slip will print two or more even if I don't have "Print Separate Picking Ticket Per Site" at sales document print option applied. 

I have tried numerous scenario on trying to recreate this error and cannot on a different database. Is there GP setting that will prevent user from adding a row in between items? Additionally, where could I check to prevent picking ticket or packing slip to show only one report even if it's from two different site ID

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    Re: "You cannot insert a row" at sales transaction window

    Hi Kenta,

    Can you run the following query aginst the database where the problem sales document is?

    SELECT LNITMSEQ FROM SOP10200 WHERE SOPNUMBE = '?????'  

    If this returns no rows, then run the following

    SELECT LNITMSEQ FROM SOP30300 WHERE SOPNUMBE = '?????'  

    ('?????' ... replace this with the SOP Document Number of the problem sales document).

    Can you post the results here?

  • Kenta Harada Profile Picture
    120 on at
    Re: "You cannot insert a row" at sales transaction window

    Thank you Ian. I ran the query and it made sense after looking at those numbers.

    It uses 16384 as the first number and incremented 1 thereafter.

  • Verified answer
    Community Member Profile Picture
    on at
    Re: "You cannot insert a row" at sales transaction window

    Hi Kenta - the line item sequence number works in multiples of 16384.

    So the first line you (manually) enter on a sales order gets 16,384. If you then add a line after that, it gets number 32,768, and the next (third line) is 49,152...and so on.

    This means that you can go back and insert a new line between lines 1 and 2 - and this gets a line item sequence number of 24,576 (Half way between 16,384 and 32,768).

    So - a limitation...you can add two lines to a sales document, and then start inserting new lines between these...up to a maximum of 16,383 inserted lines.

    In your case above - the two lines where you were trying to insert a new line - must have been sequential - ie 16384 followed by 16,385...or something like that.

    This asks the question - how were these lines added? It is unlikely that a user managed to insert 16,383 lines manually!! - I am guessing that you are importing the lines using a custom application. If so, you need to check the code that inserts lines - and force the Line Item Sequence Number to operate in multiples of 16,384...and so mimic what GP does when you manually enter a transaction line.

    Hope this helps.

    Ian.

  • Community Member Profile Picture
    on at
    RE: "You cannot insert a row" at sales transaction window

    Ian, thank you for this excellent information but I have an additional question.  Could I go through SQL and change the line numbers for a specific order so the user can get around the issue.

  • soma Profile Picture
    24,410 on at
    RE: "You cannot insert a row" at sales transaction window

    Yes. User can insert new rows between the lines if you correct the line sequence number in backend.

    Hope this helps!!!

  • Community Member Profile Picture
    on at
    RE: "You cannot insert a row" at sales transaction window

    Thank you Ian,

    Clear explaination! Got me out of trouble real quick!

    Really appreciated! ;¬)

  • Community Member Profile Picture
    on at
    RE: "You cannot insert a row" at sales transaction window

    Can someone "Verifie" Ian's suggestion please ?

    It solve my problem (witch was the one mentionned in this post).

    I think I can't do it since not the person who posted this question.

  • Tim Wappat Profile Picture
    5,703 on at
    RE: "You cannot insert a row" at sales transaction window

    Just for other readers, be aware that merely renumbering the order lines sequence can orphan records if you don't catch all the dependant tables. 

    There may be 3rd party products doing wacky things too, just have a careful think. 

    At the end of this post  is a query to run to find all the tables with line sequence column name, many are not SOP tables, check they are not referencing sop tables though. 

    There are more obvious ones like POP-SOP links, order line comments etc.

    Although not likely to seriously screw up, it may cause some issues if not executed carefully. 

    SELECT c.NAME AS 'ColumnName'

    ,t.NAME AS 'TableName'
    FROM sys.columns c
    JOIN sys.tables t ON c.object_id = t.object_id
    WHERE c.NAME LIKE '%LNITMSEQ%'
    ORDER BY TableName
    ,ColumnName;

    I have also verified the answer as you suggested.

  • Community Member Profile Picture
    on at
    RE: "You cannot insert a row" at sales transaction window

    Hi everyone,

    Just wanted to say how I got ride of my problem. In my case, I simply checked the LNITMSEQ of the SOP document where the problem was pointed at (the line in problem was indeed sequential with the next line but not with the second line after). I had the user suppress the line right after where he was trying to insert a line (deleting the sequential) so he was able to insert the lines where he wanted. He also had to re-enter the line that I made him delete. Et Voilà!

    Way more safer by the app than by the DBs. ;¬)

    Have a nice day!

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans