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 :
Microsoft Dynamics AX (Archived)

Change number sequence Prefix/Format by X++

(0) ShareShare
ReportReport
Posted on by 334

Hi, Experts:

We have a request to change the format (prefix) of some number sequence by X++.

It should be incorrect to modify the fields(format/AnnotatedFormat) of table (NumberSequenceTable)  directly.

The class NumberSeq seems to have some methods to manipulate the number Sequence.

Could anyone have some experiences about how to write code to change the Prefix(for example, from a### to b###) of a Number Sequence?

Thanks 

Quatrani

*This post is locked for comments

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,035 Super User 2025 Season 2 on at

    Hi Quatrani,

    What would be the reason to have X++ to change some number sequences? Wouldn't it be easier to change it manually? Then the annotated format will be aligned as well. If you really need to manage the format, you can search this forum where the annotated format coding was discussed before: community.dynamics.com/.../594024

  • JCHI Profile Picture
    334 on at

    Hi, Andre:

    Thanks for the quick reply and suggestion.

    The reason to change format is we would like to run a batch to reset some numberSeqs when those are close to the biggest number.

    The idea is to change the prefix and reset the smallest number.

    I follow your link and find the method createAnnotatedFormatFromFormat seems get things done. thanks!

    Quatrani

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans