And the answer is... The problem is that the ContactPerson table has an initValue method that does not get called by the file import routine, and that is what generates the "reference" record used to initialize the HRMVirtualNetworkTable record that cross references to the ContactPerson table.
The solution is to add the following code to the Conversion tab of the Import Definition Group and enable the conversion (checkbox field). ; ContactPerson.contactPersonId = NumberSeq::newGetNum (CompanyInfo::numRefContactPersonId()).num(); Make sure that your first line of code is a single semicolon. This forces Axapta to buffer the code that follows. Compile the conversion and run the import. The record complex for the Customer Contacts is two tables: ContactPerson and HRMVirtualNetworkTable. The import is made to the ContactPerson table and the methods in that table create the necessary records in the HRMVirtualNetworkTable. If you have any problems with this just send me an email. [EMAIL PROTECTED] Best Regards, Dick Howard BKD Technologies Indiana USA --- In Axapta-Knowledge-Village@yahoogroups.com, Varden Morris <[EMAIL PROTECTED]> wrote: > Hi Dick, > > Are the State, County and Country fields data accurate? These are also reference fields in addition to the customer account number that need to have corresponding values in the state, county and country tables respectively. > > Varden Morris > > Dick Howard <[EMAIL PROTECTED]> wrote: > Have successfully imported CustTable using an Excel template and now > need to import over 800 Contacts for those customers to the > ContactPerson table. Mostly am importing names and phone numbers. > But the import issues the following error for each > record... > > "Field 'Reference' must be filled in" > > Attempted to correct by putting the CustAccount number into the > Reference field of the import file still get an error, just a > different error... > > "Unknown type: 'VT_BSTR'" > > Have also tried putting the RecID of the CustTable record in the > Reference field but the message remains the same as with the > CustAccount number in that field. > > Any help or suggestions welcomed. > > Best Regards, > > Dick Howard > BKD Technologies > Indiana USA > > > > > Sharing the knowledge on Axapta. > > > > --------------------------------- > Yahoo! Groups Links > > To visit your group on the web, go to: > http://groups.yahoo.com/group/Axapta-Knowledge-Village/ > > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > > > > --------------------------------- > Discover Yahoo! > Get on-the-go sports scores, stock quotes, news & more. Check it out! ------------------------ Yahoo! Groups Sponsor --------------------~--> Has someone you know been affected by illness or disease? Network for Good is THE place to support health awareness efforts! http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/kGEolB/TM --------------------------------------------------------------------~-> Sharing the knowledge on Axapta. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/Axapta-Knowledge-Village/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/