Hi,
First post, new to Navision.
I've imported a file of Postcodes using a dataport.
Now I need to import a file of customers, and as I import I want to check that the postcode on the customer record exists in the Postcodes table.
Simple, eh?
But how do I do it???
I've created 'test' tables to mess around with, and here's what I've tried so far...
I've set the TableRelation property on the "Cust Postcode" field to TEST_Postcodes.Postcode, and ValidateTableRelation is set to YES, but when I ran the Dataport it imported customers with non-existant postcodes.
Then I created a record variable and entered code in the OnInsert trigger for the TEST_Customers table as follows :
IF NOT(recTest_Postcodes.GET("Cust Postcode")) THEN
ERROR('Invalid Postcode');
Same thing, still imported customers with invalid data.
](*,) What to do??
Thanks a lot for any help!
J.
0
Comments
By the way, the syntax: is not correct. The right way to write the lines you mention is this: But again, just the GET should be enough.
RIS Plus, LLC
I wanted the custom error so that I could specify which customer record had the invalid postcode - it's working fine now.
Rgds,
Jennie.
RIS Plus, LLC