No Series Management

anakinanakin Member Posts: 27
Hi all,

I want call NoSeriesMgt.InitSeries function in form - OnNewRecord trigger to show the next record number (primary key) when I press F3 key, but raise an error message about transactions.
It's not possible call NoSeriesMgt.InitSeries from form - OnNerRecord ?

anakin ](*,)

Comments

  • WaldoWaldo Member Posts: 3,412
    Yes it should be possible, but I don't fully understand your problem... .

    What is the error you're getting?
    What is it that you're trying to do?

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • babbab Member Posts: 65
    It is not possible from the OnNewRecord trigger of the form, and also it is not recommended to do things like this on form triggers.
    You can do it in the OnInsert trigger of the SourceTable of the form.
  • anakinanakin Member Posts: 27
    bab wrote:
    You can do it in the OnInsert trigger of the SourceTable of the form.

    Ok, it's right, but I want show to the user the new record number, before insert the record (property delaiedinsert is true and the record number textbox is not editable)
  • babbab Member Posts: 65
    Ok, I get it...
    then you can use
    "No." := NoSeriesMgt.GetNextNo(SomeSetup."Something No. Series Code", WORKDATE, FALSE);
    
    Where the last parameter indicates if the series has to be modified or not.
Sign In or Register to comment.