Sorry David, but your appointment is invalid. When a user log into Axapta, the Kernel takes 25 recids into cache, and adds 25 to next value. Try yourself as below (create a table called T with a single string field called A):
static void Job4(Args _args)
{
SystemSequences SS;
T T;
int i;
;
for (i=1; i<= 3; i++)
{
//select * from SS where SS.Id == -2;
select firstonly SS;
info (int2str(SS.nextVal));
T.A = 'Hello';
T.insert();
warning (int2str(T.RecId));
}
{
SystemSequences SS;
T T;
int i;
;
for (i=1; i<= 3; i++)
{
//select * from SS where SS.Id == -2;
select firstonly SS;
info (int2str(SS.nextVal));
T.A = 'Hello';
T.insert();
warning (int2str(T.RecId));
}
}
As you see, the values shown don't match... That's why I don't want to use the table SystemSequences nor class SystemSequences (it doesn't provide any method to look the recId that will be about to be used).
More suggestions???
Raúl Llorente Peña
Análisis, Desarrollo e Implementación en
Microsoft Bussiness Solutions-Axapta
OPEN SOLUTIONS
-----"David Casas" <[EMAIL PROTECTED]> escribió: -----
Análisis, Desarrollo e Implementación en
Microsoft Bussiness Solutions-Axapta
OPEN SOLUTIONS
Para: <Axapta-Knowledge-Village@yahoogroups.com>
De: "David Casas" <[EMAIL PROTECTED]>
Fecha: 24/02/2005 10:23
Asunto: Re: [Axapta-Knowledge-Village] How can I find what RecId will be the next to be used?Hi Raul,To see the next RECID to be used with the following sentence in the SQLAnalyzer:select * from systemsequences where id = -2
The field NextVal is the value for the next transaction IDRegards!!David----- Original Message -----Sent: Wednesday, February 23, 2005 6:07 PMSubject: [Axapta-Knowledge-Village] How can I find what RecId will be the next to be used?How can I find what RecId will be the next to be used, before inserting a record and without accessing the table of RecIds (SystemSequences)?
Raúl Llorente Peña
Análisis, Desarrollo e Implementación en
Microsoft Bussiness Solutions-Axapta
OPEN SOLUTIONS
Sharing the knowledge on Axapta.
Sharing the knowledge on Axapta.
Sharing the knowledge on Axapta.
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.