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.
0
Comments
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.
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.
can u explain me why we have to put reset on the tempvariable before calling count.
Regards,
chandru.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.