Dear friends
-Can you please help me with this problem?
-Rec.Mn is decimal and so is Table2.Quantity
-Rec is of type Record and SrcTableRef is RecordRef
Problem: first of these lines works without problem, second one causes Navision Crash
Rec.Id := SrcTableRef.FIELD(Table2.FIELDNO("No.")).VALUE;
Rec.Mn:= SrcTableRef.FIELD(Table2.FIELDNO(Quantity)).VALUE;
(If I comment second line, all code works perfectly)
P.S. I am just testing the code ... I am gonna pass FieldNo as variable of course ....
Comments
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
All code looks like this(little bit different table names):
OrigPredAnal.SETFILTER("Line Type",origpredanal."line type"::item);
Second:
what do you mean with "navision crash"?does it errors?or it really close inexpectedly?
if it's an error, post it...
P.S.: i'm wondering why are you using a recref for this loop...can't you simply use origrecamount to do the repeat/until?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
2. Yes navision just crashes with no error. Just : Unexpected error , do yo wan to send info to Microsoft .... and Client restarts
3.
Because RecRef will point to different source records changing at runtime.
2. sorry, i don't have time to check the code up to now
3. you can just use another record variable, like OrigPredAnal2 :-k
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Besided
I have to do it like this
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.