Hi,
I have this customer who regularly gets in conflict with the AutoSplitKey function on his Sales Orders, since he needs to be able to insert a lot of lines between the ones that are already there. I'm thinking about writing a little function which will:
1. Copy all the lines on the sales order in question to a temporary table.
2. Delete the original sales lines.
3. Run through the lines in the temporary table and put them back in the sales line table, ordered in a nice 10000 > 20000 > 30000 fashion, thereby enabling my customer to insert lines again.
I am aware that I will have to take care of the "Attached to line no." field, but I would like to know if there are other factors that I need to take into consideration before I do this.
Anyone?
/Q
0
Comments
Each line no starts 10000 then 20000, etc
http://www.BiloBeauty.com
http://www.autismspeaks.org
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
The confict is, that the Autosplitkey-function "halves" the difference between the two line numbers. When I insert a line between 10000 and 20000, the
If I need to insert a number of text lines between line no. 10000 and 20000 (and assuming that i start with the first text line) then I'm limited to 14 or 15 lines before Autosplitkey function hits the final sequence 19990, 19995, 19997, 19998, 19999 and then runs out of numbers.
I will think about that as well. Thanks!
This way you have more lines possible between 2 existing Lines.
is it more items - is it just text for desription, comments , etc
perhaps if we knew the need for all the insertion a better solution might be possible :-k
http://www.BiloBeauty.com
http://www.autismspeaks.org
O.K. I'll give it a go.
It's not just text. Most of the lines that he adds on the fly, are resource lines. But also text lines and an occasional G/L line.
His sales orders have a number of "Header lines", describing different parts of that order (e.g.: Roof, Walls, Foundation). As work progresses, he adds lines - mainly of the resource variety but also quite a bit of text, describing the tasks performed - beneath the relevant "Header line". And sometimes, on larger projects, he hits the limit due to the Autosplitkey function running out of free numbers.
That is pretty much it. I hope it makes a bit of sense.
/Q
I hope this explains it