boolIsMore := recTable.FIND('-')
WHILE boolIsMore DO BEGIN
recTable.VALIDATE(Price, recTable.Price *80);
recTable.MODIFY(TRUE);
boolIsMore := recTable.NEXT > 0;
END
IF recTable.Find('-') THEN BEGIN
// put pre-loop code here
REPEAT
recTable.Price := recTable.Price * 80;
recTable.MODIFY;
UNTIL recTable.NEXT = 0;
// put post-loop code here
END ELSE BEGIN
// put code here for when the record variable is empty
END;
There is no intellisense in Navision. You can use the current developer toolkit for any Navision version. Just export the object in a text file and you can import them into a dev toolkit database.
I have a problem with a code that u sent to me.......
Here is my Code:
ItemTable is variable (datatype Record, subtype Item) in C/AL Globals
IF ItemTable.FIND('-') THEN BEGIN
// put pre-loop code here
X := ItemTable.COUNT;
REPEAT
Cena := "Unit Price";
CenaEUR := "Unit List Price";
IF CenaEUR = 0 THEN
EXIT;
Cena := CenaEUR * 90;
ItemTable."Unit Price" := Cena;
ItemTable.MODIFY;
ItemTable.NEXT;
UNTIL ItemTable.NEXT = 0;
// put post-loop code here
END
X variable has 12500 records but in repeat - until statement I have only one iteration(only first record)
It's because of your EXIT statement. This exits the current trigger, not the loop. I'd do something like this:
// filtering these out is much more efficient than looping through the entire table
ItemTable.SETFILTER("Unit List Price",'<>0');
IF ItemTable.FIND('-') THEN BEGIN
// put pre-loop code here
X := ItemTable.COUNT;
REPEAT
ItemTable."Unit Price" := ItemTable."Unit List Price" * 90;
ItemTable.MODIFY;
//ItemTable.NEXT; no need for this, that is done by the UNTIL
UNTIL ItemTable.NEXT = 0;
// put post-loop code here
END
Comments
recTable.Find('-');
REPEAT
recTable.Price := recTable.Price * 80;
recTable.MODIFY;
UNTIL recTable.NEXT = 0;
boolIsMore := recTable.FIND('-')
WHILE boolIsMore DO BEGIN
recTable.VALIDATE(Price, recTable.Price *80);
recTable.MODIFY(TRUE);
boolIsMore := recTable.NEXT > 0;
END
It was very helpful for me
Is there any DevToolkit or something like that for NAV 3.60.....with intelisense etc.
download link please.
There is no intellisense in Navision. You can use the current developer toolkit for any Navision version. Just export the object in a text file and you can import them into a dev toolkit database.
RIS Plus, LLC
Here is my Code:
ItemTable is variable (datatype Record, subtype Item) in C/AL Globals
X variable has 12500 records but in repeat - until statement I have only one iteration(only first record)
why?
RIS Plus, LLC
I'm a C# programmer, and I'm a newbie in Navision, because my questions are low level
RIS Plus, LLC