Search code examples
axaptadynamics-ax-2012number-sequence

Set the year as prefix in Numbersequences


In AX 2012 I want to add the year (e.g. 2011) as prefix in the ID field.

For instance I create a new customer in AX. The ID of this new customer should be like: 2013-00000123

Is it possible to set the year in the segments instead of coding this.

How can I achieve this? Thank you in advance.


Solution

  • If the "fixed" solution proposed by Sshaheen don't suit your needs, and you really need to get a dynamic value for the year, the only suitable solution if to develop it through X++ code, in the CustTable table or class (just find where a new sequence number is obtained).

    Anyway, I'll recommend using a constant value on the number sequence, as Sshaheen states.