It is true that recId is managed in SystemSequences
table. But please also note that the next value of
RecId is not retrieved from that table all the time,
but it is cached in memory. The default cache size is
25. For example, look at this scheme:
NextVal Action NextVal
in table in cache
-------- ----------------------------- ----------
10000 user A log in, cache for A updated 10000 (A)
+25 <reserve 25 recIds for A>
10025 A creates new rec (recId = 10000) 10001 (A)
10025 A creates new rec (recId = 10001) 10002 (A)
.
.
10025 A creates new rec (recId = 10022) 10023 (A)
10025 user B log in, cache for B updated 10025 (B)
+25 <reserve 25 recIds for B>
10050 B creates new rec (recId = 10025) 10026 (B)
10050 B creates new rec (recId = 10026) 10027 (B)
10050 A creates new rec (recId = 10023) 10024 (A)
10050 A creates new rec (recId = 10024) <max> (A)
+25 update nextVal in table
10075 read and cache for A 10075 (A)
10075 A creates new rec (recId = 10075) 10076 (A)
10075 B creates new rec (recId = 10027) 10028 (B)
.... and so on
To control recId, we can use CLASS SystemSequence.
This is a system class and the documentation can be
found in AOT -> System Documentation -> Classes. By
using this class we can also control the cache size,
by using method setCacheSize(int _newSize). To get
next RecId from the cache, use method nextVal(...),
but please becareful when calling nextVal(...) the
value in cache will be automatically incremented!
Refer to the system documentation for more
descriptions on other methods.
The following code shows how to retrieve cache size:
SystemSequence seq = new SystemSequence();
;
info(strfmt('Cache size %1', seq.getCacheSize));
Regards,
- Aji Sarosa -
--- mbsaxapta <[EMAIL PROTECTED]> wrote:
> Hi
> As I know - Axapta gets the next RecId from
> SystemSequences table, column
> is NextVal.
> RecId is unique per company.
>
> tomas
>
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] Behalf
> Of Nitesh
> Sent: Tuesday, August 23, 2005 11:55 AM
> To: [email protected]
> Subject: Re: [development-axapta] where and when
> generate the RecId in
> Axapta
>
>
> Hi martin ,
> The Recid is generated by
> kernel,when a record is
> inserted into atable.The refrence of the previous
> recid is stored in "
> Dataarea" table..
>
> Nitesh
>
>
> On 8/23/05, martin_weicn <[EMAIL PROTECTED]>
> wrote:
> > Hi All,
> >
> > I am wonder where and when the system generate the
> RecId in Axapta
> > by kernel or by application or in Database, and in
> client or server
> > application? Thanks a lot.
> >
> > Martin Wei
> >
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> __________ Informace od NOD32 1.1199 (20050822)
> __________
>
> Tato zprava byla proverena antivirovym systemem
> NOD32.
> http://www.nod32.cz
>
>
>
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
SPONSORED LINKS
| Computer part | Programming languages | Microsoft axapta |
| Support exchange |
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

