Strange linkedobject behaviour

txeriff
Member Posts: 515
Hi Mates,
Does any1 know under NAV2009 if there is any row limitation for linkedobject loops? I mean:
T77007.RESET;
T77007.SETRANGE(T77007.ID_TABLA_NAV,38);
IF T77007.FINDSET THEN
REPEAT
IF NOT T77015.GET(
T77007.CDSOCIED_NEW,T77007.ID_TABLA_NAV,T77007.ID_CAMPO_NAV,T77007.ID_ADM_CAMPO,T77007.ID_SERVIDOR,
T77007.ID_INSTALACION,T77007.STD_IDFISCAL_PAIS,T77007.TIPO_SICRONIZACION) THEN BEGIN
T77015.INIT;
T77015.TRANSFERFIELDS(T77007);
T77015.INSERT;
END;
UNTIL T77007.NEXT=0;
if I run this with setrange marked in bold above it works. If I leave all records (remove setrange for table 38), seems like it skips some. I cannot understand why.
any ideas?
thanks!
Edit: Linkedobject table has no PK. perhaps this is bad for NAV? Table was not defined by me, neither linkedobject.
Does any1 know under NAV2009 if there is any row limitation for linkedobject loops? I mean:
T77007.RESET;
T77007.SETRANGE(T77007.ID_TABLA_NAV,38);
IF T77007.FINDSET THEN
REPEAT
IF NOT T77015.GET(
T77007.CDSOCIED_NEW,T77007.ID_TABLA_NAV,T77007.ID_CAMPO_NAV,T77007.ID_ADM_CAMPO,T77007.ID_SERVIDOR,
T77007.ID_INSTALACION,T77007.STD_IDFISCAL_PAIS,T77007.TIPO_SICRONIZACION) THEN BEGIN
T77015.INIT;
T77015.TRANSFERFIELDS(T77007);
T77015.INSERT;
END;
UNTIL T77007.NEXT=0;
if I run this with setrange marked in bold above it works. If I leave all records (remove setrange for table 38), seems like it skips some. I cannot understand why.
any ideas?
thanks!
Edit: Linkedobject table has no PK. perhaps this is bad for NAV? Table was not defined by me, neither linkedobject.
0
Answers
-
1. Each NAV table must have primary key. This is the first field by default.
2. Transferfields transfers field values by field numbers
3. It seems, that T77015 already contains records for some T77007 records
You should debug your code to find the reason of skipping records.0 -
1. Each NAV table must have primary key. This is the first field by default.
2. Transferfields transfers field values by field numbers
3. It seems, that T77015 already contains records for some T77007 records
You should debug your code to find the reason of skipping records.
Thanks,
It has certain key defined already.
Im thinking maybe as they didn´t define any key in sql server table, perhaps for nav is some duplicate or who knows.
I can´t just change the "logic" of all this interface.
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions