Doubts in Temp recordset

chandrurec
Member Posts: 560
Dear all,
I have created a temporary record variable and then I am passing some records into that variable.The insertion of records into the temp variable, i am doing in the Onaftergetrecord trigger of the Job ledger entry dataitem.when i try to get the count in the OnPost trigger, actually i should get the count as 5 but at present i am getting as 1.
what may be the reason for this ?
based on this count i have to do some validations in the integer table which is indented under the Job ledger entry
thanks in advance.
Regards,
chandru.
I have created a temporary record variable and then I am passing some records into that variable.The insertion of records into the temp variable, i am doing in the Onaftergetrecord trigger of the Job ledger entry dataitem.when i try to get the count in the OnPost trigger, actually i should get the count as 5 but at present i am getting as 1.
what may be the reason for this ?
based on this count i have to do some validations in the integer table which is indented under the Job ledger entry
thanks in advance.
Regards,
chandru.
0
Comments
-
Can you post here the part of your code?0
-
I presume "MaxIteration" property is not set to 1 for Job ledger entry dataitem0
-
Hi all,
this is the code i have written
LedEntDim.RESET;
LedEntDim.SETFILTER("Table ID",'%1',169);
LedEntDim.SETRANGE("Entry No.","Job Ledger Entry"."Entry No.");
IF LedEntDim.FIND('-') THEN
REPEAT
TempLedEntDim := LedEntDim;
TempLedEntDim.INSERT;
TempLedEntDim2.RESET;
TempLedEntDim2.SETFILTER(TempLedEntDim2."Table ID",'%1',169);
TempLedEntDim2.SETRANGE(TempLedEntDim2."Dimension Code",TempLedEntDim."Dimension Code");
IF NOT TempLedEntDim2.FIND('-') THEN BEGIN
TempLedEntDim2.INIT;
TempLedEntDim2.TRANSFERFIELDS(LedEntDim);
TempLedEntDim2.INSERT;
//MESSAGE(TempLedEntDim2."Dimension Code");
END;
TempLedEntDim3.RESET;
TempLedEntDim3.SETFILTER(TempLedEntDim3."Table ID",'%1',169);
TempLedEntDim3.SETRANGE(TempLedEntDim3."Dimension Value Code",TempLedEntDim."Dimension Value Code");
IF NOT TempLedEntDim3.FIND('-') THEN BEGIN
TempLedEntDim3.INIT;
TempLedEntDim3.TRANSFERFIELDS(LedEntDim);
TempLedEntDim3.INSERT;
//MESSAGE(TempLedEntDim3."Dimension Value Code");
END;
Cnt:=Cnt+1;
UNTIL LedEntDim.NEXT=0;
Regards,
chandru.0 -
Hi PrabubDesh,
I have not set the MAxIteration property to 1 but still i am getting the count as 1 and not the actual count. the code which i have written is pasted above please have a look at the code and tell where the mistake lies?
If you dont mind please give me ur gmail id so that we can chat ober gtalk.
Regards,
chandru.0 -
Call RESET on your temp record variable before calling COUNT.There are no bugs - only undocumented features.0
-
Hi bbrown,
can u explain me why we have to put reset on the tempvariable before calling count.
Regards,
chandru.0 -
So that the temo record variable sees all records in the table, not just the last one insertedThere are no bugs - only undocumented features.0
-
chandrurec wrote:Hi bbrown,
can u explain me why we have to put reset on the tempvariable before calling count.
Regards,
chandru.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