web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Number Sequence Saving

(0) ShareShare
ReportReport
Posted on by 454

Hi ,

I have Created one number sequence and assigned to a field. My requirement is when i Press the Save button in the form then only it should be inserted in a table. Otherwise the generated number sequence should not be saved. 

Regards,

Ram

I have the same question (0)
  • Ramit Paul Profile Picture
    22,797 Most Valuable Professional on at

    HI Ram,

    Can you give us more info in which field you are adding the num sequence?

    It is hard to share some solution with the above info you shared.

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Isn't it handled by NumberSeqFormHandler automatically?

    If you're not aware of NumberSeqFormHandler, please consult Number Sequence Framework > Using Number Sequences in an Application.

  • Ram Kumar Profile Picture
    454 on at

    Hi Ramit Paul,

    I have created a new Table named _PPAPHist table. There is one Field called PPAPID. The number sequence should be created for this Field, I have created a new number sequence for that. The generated number sequence should be saved only when i Press save button in the form.Otherwise it should not be saved. For eg: if i entered a new line with generated number seq "1". Only it should be stored when i press save button. If i not pressed Save and closed the form. The number sequence should be start with 1.

    Regards,

    Ram

  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    The number sequence Next value must be updated when the value is fetched. It can't be updated only when your user saves the record. Otherwise you would get a conflict if two users were creating records in this table at the same time:

    1) User A creates a record and gets nr 1 from the sequence. The record is not yet saved.

    2) User B creates a record and gets nr 1 from the sequence. The record is saved.

    3) User A tries to save, but it fails because there already exists a record with nr 1.

    But, you can set the number sequence to Continuous, then it will reuse the discarded values. This is heavy for performance and should only be activated if there's a legal requirement to have a continuous sequence without gaps.

    Do you have a legal requirement behind this? Or why do you not want to have gaps in the numbers?

  • Suggested answer
    Ramit Paul Profile Picture
    22,797 Most Valuable Professional on at

    Hi Ram,

    I think the continuous option will be fine for this as Nikolaos adviced.

    Curious about which country as I have seen many European countries have this requirement for audit purpose.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans