Record found not matching record present

ResenderResender Member Posts: 119
edited 2012-01-25 in Navision Attain
Hello I'm currently developing a new functionality to one of our codeunits.
This codeunit is ment to send an email when an edi file is processed, all the code for it exists already. I just have to make sure the mail gets send to the right email address.

In order to find the email adress for an edi file we have to look up the department(Afdelingepartment in a table Subdossier(this was created by our own team).We can get the right
record by the currentkey dossiern° and subdossiern°,which we get out of the edi.

Well I've written the code but no mail is send, so I went to debug a test scenario.
Thge result is strange at least, we have a dossiern° and subdossiern° thats present in the table, but when execute the code
(lrecSubile being the recordvariable)

lrecSubfile.RESET;
lrecSubfile.SETCURRENTKEY(Dossiernr,Subdossiernr);
lrecSubfile.SETRANGE(Dossiernr,'BE070104043');
lrecSubfile.SETRANGE(Subdossiernr,'BE070104043-001');
IF lrecSubfile.FIND('-') THEN BEGIN
REPEAT
MESSAGE(lrecSubfile.Afdeling);
UNTIL lrecSubfile.NEXT =0;
END;

It gives me a blank result, anyone got an idea what could be wrong.

Comments

Sign In or Register to comment.