help with code

alexhardoalexhardo Member Posts: 4
hii all,

i'm completely new in this world, and im still confused with looping and conditional statements here
so maybe if you don't mind, can you help me with finding where are my mistakes that leads to a syntax error?


IF "Balance (LCY)" = 0 THEN BEGIN
myrec.SETRANGE("Customer No.","No.");
IF myrec.FINDSET THEN BEGIN
REPEAT
IF myrec.Open = TRUE THEN BEGIN
ERROR(openIsTrue); //openIsTrue ==> error msg
END
UNTIL myrec.NEXT=0;
END;
ELSE BEGIN
ERROR(postIsNotAvailable); //postIsNotAvailable ==> error msg
END;
END;
ELSE BEGIN
ERROR(SaldoisNotZero); //SaldoisNotZero ==> error msg
END;



svs76vglfuq1.png



thnx

Best Answer

Answers

  • Wisa123Wisa123 Member Posts: 308
    Austrian NAV/BC Dev
  • alexhardoalexhardo Member Posts: 4
    hii all again,
    thanks for your valuable Feedback, and my apologies for writing my code in a bad form.
Sign In or Register to comment.