Options

Increase the line number

Hello,
I created an interaction log entry page. This page has interaction log entry comment line. I thought, interaction log entries and comments complete on single page.

when I write new comment line, comment line no always get zero. I wrote comment sheet page but didnt work.

OnInit()
Inter.RESET;
Inter.SETRANGE("Entry No.", "Entry No.");
IF Inter.FINDLAST THEN
Inter."Line No." := Inter."Line No." + 10000
ELSE
Inter."Line No." := 10000;

8o0aw9lp336j.png

Best Answer

  • Options
    aberkalaberkal Member Posts: 8
    Answer ✓
    I found the problem. This comment sheet was not subpage, it was list. I created new subpage, it was solved

Answers

  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    Why do you write new line in code? What if your user wants to add a comment line in front or in betweem of existing ones?

    Remove all of the code from the subpage and use the AutoSplitKey property instead.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    aberkalaberkal Member Posts: 8
    Why do you write new line in code? What if your user wants to add a comment line in front or in betweem of existing ones?

    Remove all of the code from the subpage and use the AutoSplitKey property instead.

    Thanks for answer.

    I wrote because I didnt know AutoSplitKey property. I tried but nothing has changed. The first value always get zero. Is it interesting?
  • Options
    aberkalaberkal Member Posts: 8
    Answer ✓
    I found the problem. This comment sheet was not subpage, it was list. I created new subpage, it was solved
Sign In or Register to comment.