Importing customers

RairoRairo Member Posts: 11
Hello,

I want to import customers into Navision and have everything in a flat text file. I created a dataport to import the customers, and all works fine.
However, when you normally create a customer from a card, automatically a customer 'company' is created in the contacts table (and I'm assuming a business relationship is setup then).

I solved this by running report 5195 (Create Conts from Customers).

Now I also have a whole buncha ship-to addresses (for table 222) and importing those work great and they are properly attached to the original customer......however, I want to create a contact from each ship-to address as well as 'Person' (since I can do this with the data I have and it was requested.)

How do I attach this automatically? or better yet.....is there a proper manual on how to PROPERLY import Customers so it populates everything everywhere properly?

Thanks!

Comments

  • krikikriki Member, Moderator Posts: 9,118
    You need to use the validate-triggers on the fields and the OnInsert- (or OnModify) trigger on the table.
    So instead of directly importing it in the table, don't automatically save the record (properties AutoSave=no;AutoUpdate=No;AutoReplace=No), but create a new record-variable, VALIDATE all the needed fields in that variable and then do a INSERT(TRUE) of that record.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.