Hi All,
I am running 1 custom codeunit. But getting error that
Vendor No. " does not exist.
I have imported this table data from 1 .csv file.
The code I have used in codeunit is like this.
VEND1.GET;
IF VEND1.FIND('-') THEN
REPEAT
IF VEND1.City<>'' THEN
IF VEND1.City='MUMBAI' THEN
BEGIN
VEND1.City:='MUM'
END;
VEND1.MODIFY;
UNTIL VEND1.NEXT=0;
Anyone have solution about this?
Thanks,
Sandip
0
Answers
The above code tries to get a Vendor with blank primary key (blank No.) and that why you get the error "Vendor No. " does not exist. "
Regards
Claus
Copy from Navision help:
GET (Record)
Use this function to find a record based on values stored in primary key fields.
[Ok :=] Record.GET([Value] ,...)
Ok
Data type: boolean
If you omit this optional return value, a run-time error occurs if the system cannot find the record. When you include the return value, the system assumes you will handle any errors. The return value can have these values:
http://www.AcumenConsulting.co.nz
VEND1 is the recrod variable for table Vendor defined in C/AL Globals.