Line No. Configuration from 10000 to 1

manisharma31manisharma31 Member Posts: 285
Is there any way that i can configure the Line No. to start from 1 & not from 10000.

I want to use a form's Line No. as Sr No. which will be displayed to the user.

Is there any way i can configure but not coding.
Regards,
Manish

Answers

  • RomulRomul Member Posts: 21
    Is there any way that i can configure the Line No. to start from 1 & not from 10000.

    I want to use a form's Line No. as Sr No. which will be displayed to the user.

    Is there any way i can configure but not coding.

    What for do you want to do it?
    "Line No." is not a field for user. It's used as part of primary key...
  • BeliasBelias Member Posts: 2,998
    and its 10000, 20000, 30000...for supporting the autosplitkey property: search "autosplitkey" in online help and/or mibuso to understand it
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • manisharma31manisharma31 Member Posts: 285
    yea i know the autosplit property well avaliable on forms & pages & it must be the primary key in the table.

    But where is navision picking 10000 from,is it in the .exe or what ?
    Regards,
    Manish
  • BeliasBelias Member Posts: 2,998
    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
  • manisharma31manisharma31 Member Posts: 285
    ok
    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.
    Regards,
    Manish
  • BeliasBelias Member Posts: 2,998
    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
  • manisharma31manisharma31 Member Posts: 285
    thanks.

    I need to use Line No. of comment sheet as Serial No.
    Regards,
    Manish
  • BeliasBelias Member Posts: 2,998
    :? :? :?
    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
  • mihail_kolevmihail_kolev Member Posts: 379
    why don't you just add new field for the user?? It's not so hard to evaluate it...
    -Mihail- [MCTS]
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • kinekine Member Posts: 12,562
    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...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.