Options

C/AL Code to Pick Number Series

EwanEwan Member Posts: 54
edited 2013-09-16 in Navision Financials
Hi can anyone let me have some C/AL code that will allow me to do the following:

Select a number series
get the next number from the series

I want to create a code unit to generate sales ledger journals behind the scenes and Post them using the number series

(My code currently create and post the journals, however I need to post using the correct number series)

Thanks for your help

Ewan

Answers

  • Options
    ara3nara3n Member Posts: 9,255
    NoSeriesMgt is cu NoSeriesManagement


    "document no." := NoSeriesMgt.GetNextNo('your no series code',"Posting Date",true);
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.