if you remove autosplitkey property from the sales order subform (for example), you'll notice that the new lines will always be inserted with line no. = 0...so if it's the user that is inserting line, the line no. value is not code driven...
if you are instead writing sales line table during a process, you have to set the line no. by code
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso My Blog
personally, i wouldn't do what you are trying: maybe there's a better approach to the business need you're trying to fulfill...if you tell us what is the request from your customer, we can try to suggest you a better approach.
The problems of your approach:
- you're modifying standard behaviour
- users will never be able to insert a line between 2
- you'll probably have problems of renaming messages (probably)
- users are free to screw the numbers on the lines
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso My Blog
:? :? :?
the question is: why? i don't think that the customer told you:
"can you use line no. of comment sheet as serial no, please?"
i can't actuallay understand what is the reason for doing this: can't you use the standard functionality for generating serial nos.?if so, why?
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso My Blog
Definitely, it is better to add own filed for this than "hacking" the standard. Because if you will do that, you will end with question like "Why I cannot insert new line between existing lines?" and you will need to rename all lines after this inserted line to meet the requirement. Just add new field, add function which will go through the lines and fill the field with correct number, rigger this function on correct points and you are done...
Answers
What for do you want to do it?
"Line No." is not a field for user. It's used as part of primary key...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
But where is navision picking 10000 from,is it in the .exe or what ?
Manish
if you are instead writing sales line table during a process, you have to set the line no. by code
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
so its in the .exe.
Then i need to write a code, to modify the line no. from 10000 to 1.
Anyways thanks for all ur help.
Manish
The problems of your approach:
- you're modifying standard behaviour
- users will never be able to insert a line between 2
- you'll probably have problems of renaming messages (probably)
- users are free to screw the numbers on the lines
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I need to use Line No. of comment sheet as Serial No.
Manish
the question is: why? i don't think that the customer told you:
"can you use line no. of comment sheet as serial no, please?"
i can't actuallay understand what is the reason for doing this: can't you use the standard functionality for generating serial nos.?if so, why?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.