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

Announcements

News and Announcements icon
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
    306,118 Super User 2026 Season 1 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans