Thinking caps needed! Here is the situation. We are using a product called Data Backbone to communicate with a companies Oracle financials system. With Data Backbone you can setup scheduled jobs that transfer data from Oracle into Navision. The problem is that there is obviously no validation on the records coming in which creates a problem. What we thought the best way to do this, was to have tables that were copies of the originals(i.e Interface Vendor is a copy of Vendor) as a temporary holding place. Then from there we can do the validates into the proper table. The following is an example from a case statement. What is happening here is that for all the records in the interface vendor table it will validate fields(the codeunit you see there) and supress any error messages. If the codeunit runs through ok it will insert the record into the Vendor table. If not then it will send out an email with the table and record where there was a problem. I was just wondering if there was a clever way to supress the error messages but be able to get information on what went wrong.(ie. Failed on validate("Unit of Measure);
CASE "Table ID" of
DATABASE::"Interface Vendor":
IF IntVendor.FIND('-') THEN
REPEAT
Vendor.TRANSFERFIELDS(IntVendor);
COMMIT;
IF CODEUNIT.RUN(CODEUNIT::"Transfer Vendor",Vendor) THEN BEGIN
IF NOT Vendor.INSERT THEN
Vendor.MODIFY;
//IntVendor.DELETE;
END ELSE BEGIN
cnt := 0;
ErrorTable := Vendor.TABLENAME;
ErrorArray[ArrayCount] := IntVendor."No.";
ErrorArray[ArrayCount] := IntVendor.Name;
ErrorArray[ArrayCount] := IntVendor."Vendor Posting Group";
ErrorArray[ArrayCount] := FORMAT(IntVendor.Blocked);
ErrorArray[ArrayCount] := FORMAT(IntVendor."Created by DBB");
ErrorArray[ArrayCount] := FORMAT(IntVendor."Date Created by DBB");
ErrorArray[ArrayCount] := FORMAT(IntVendor."Time Created by DBB");
SendErrorMail(ErrorArray);
END;
UNTIL IntVendor.NEXT =0;
END;
I hope that all made sense. Sorry about the code section. I don’t know how to get it to work, and I have no time to figure it out. Taylor McCartney Development Specialist CSB Systems tmccartney@csbsystems.com