The reason for taking 10000 and not 100 is simply that if you insert a new line between ie. line one and two then there must be an empty line no. to use. If you have only 100, then the next line was 150 (if inserted between the two lines). And the next again 125 - then 112, then 106, then 103. As you see not a lot of options.
The code you show above is for creating the sales shipments, where the system does the same thing as the Autosplit Key function.
Maybe I should give the same answer a few times in different words, hoping that it will answer the same question that has been asked a few times. Something must be lost in translation.
There is no C/AL code anywhere that assigns the line number. This is done automatically by the internal code. The property called ‘Autosplitkey’ automatically assigns the line number, and it gives you enough room (in most cases) to insert lines in between. It does not execute any C/AL code.
There is no code that you can see the assignment. It is not in C/AL code. The code is not visible for us to see, it is internal in the executable of the form.
The code to assign the line number does not exist in a place that you can see it. It is part of the program, it is not programmed in C/AL code.
There is no place that there is an assignment in C/AL code. It exists, but not in C/AL, so we cannot see it.
There is no assign. It is done by the form, not in some C/AL code statement
The posting routine is an example where it is programmed in C/AL. In that example it is programmed in C/AL, not by setting a property.
Setting it with the property makes it assign the number automatically, not by C/AL code.
I don’t know why they took 10000. It could have also been 20000, or 30000, or 5, or 657483957662551437869. Different numbers have different number of lines that you can insert. I guess they liked the number 10000 because it is an easy number. It’s just the way that it works, and you cannot change it.
You cannot change it because it is internally, not in C/AL. So you cannot see it, there is no place where you can read the code, because it is not programmed in C/AL.
Autpsplitkey is a property that is only available on forms. In any other type of object it has to be programmed. That is why in the sales posting routine it is programmed in C/AL, and on forms that have the property turned on it is done automatically.
Autosplitkey is not programmed in C/AL, it is part of the executable. There is no place that you can look at the assignment in C/AL because it is not there.
I think it is mostly a language issue. Hopefully, by saying it a few different ways, it will be clear. It’s frustrating enough not to be able to find something, and I really want them to understand the difference.