Exactly, I knew I've seen it somewhere :)
"Enforced Sequence (no gaps, per organization)"
Thanks guys,
I'll have a look at it.
Another question: do you have any idea how this enforced sequence might
behave in case of two ofbiz servers - in a cluster or sharing a
database ?
My goal is to generate IDs without absolutely any gaps.
Another very important requirement is that the order of the record's
CREATED_DATE should match the order of the IDs. It is not possible to go
back and fill a gap.
Example:
A good example:
ID | CREATED_DATE
---------------------------------------------
1 | 1 June 9:00 AM
2 | 1 June 10:00 AM
A bad example:
ID | CREATED_DATE
---------------------------------------------
1 | 1 June 10:00 AM
2 | 1 June 9:00 AM
I already have an idea of a workaround,
but I'll investigate the enforced sequence first.
Thanks again,
Deyan
On Sat, 2009-06-13 at 05:42 -0700, BJ Freeman wrote:
> Organization GL Settings >Available Internal
> Organizations>Company>Setup>Accounting Preferences
>
> David E Jones sent the following on 6/13/2009 5:15 AM:
> >
> > Take a look at the party/organization accounting preferences in the
> > Accounting Manager. If you're looking for this sort of sequencing for
> > invoices, orders, etc then it is already supported.
> >
> > -David
> >
> >
> > On Jun 13, 2009, at 5:44 AM, Deyan Tsvetanov wrote:
> >
> >> Hi list,
> >>
> >> I'd like to use a custom ID generator - for instance rather to start
> >> from 10000 and increment by 10 I'd like to start from 0, increment by 1
> >> leaving no empty values and probably append some other rules - like to
> >> reset to 0 in the beginning of each year and prefix the returned ID by
> >> the current year.
> >>
> >> Example:
> >>
> >> 200900001
> >> 200900002
> >> ....
> >> 200932110
> >> ....
> >> 201000001 <--- a new year starts.
> >>
> >> I know it may sound pretty dumb, but the law makers in some countries
> >> are not so smart.
> >>
> >> So - could somebody give me some hints - is it possible to specify a
> >> custom ID generator per field typed "id-ne" in the entitymodel.xml ?
> >>
> >> Thanks in advance,
> >> Deyan
> >>
> >
> >
>