C-AL problem...

voodoo
Member Posts: 82
How can I get all records from some table, for example:
FOR i:=firstrecord to lastrecord DO BEGIN
price:=price * 80;
END;
This is just an example what I want to do, but I don't know how
FOR i:=firstrecord to lastrecord DO BEGIN
price:=price * 80;
END;
This is just an example what I want to do, but I don't know how

misha fka voodoo
0
Comments
-
voodoo wrote:How can I get all records from some table, for example:
FOR i:=firstrecord to lastrecord DO BEGIN
price:=price * 80;
END;
This is just an example what I want to do, but I don't know how
recTable.Find('-');
REPEAT
recTable.Price := recTable.Price * 80;
recTable.MODIFY;
UNTIL recTable.NEXT = 0;0 -
bostjanl wrote:voodoo wrote:How can I get all records from some table, for example:
FOR i:=firstrecord to lastrecord DO BEGIN
price:=price * 80;
END;
This is just an example what I want to do, but I don't know how
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;
END0 -
Thnx
It was very helpful for memisha fka voodoo0 -
I have one more question.....
Is there any DevToolkit or something like that for NAV 3.60.....with intelisense etc.
download link please.misha fka voodoo0 -
or, a simple version:
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.0 -
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 GlobalsIF 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)
why?misha fka voodoo0 -
voodoo wrote:why?
// 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
0 -
Thnx Daniel,
I'm a C# programmer, and I'm a newbie in Navision, because my questions are low levelmisha fka voodoo0 -
No problem, glad I can help
I'd have very similar questions if I had to start with C#.
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