We are trying to import Addresses from our D365 ERP into DW10. We are using the CustomerNumber as our primary key in D365, but since the customers are imported/created in DW, there is currently no mapping from User Accounts in DW to D365. What we would like to do is set the UserId on the AccessUserAddress table to the UserId of the AccessUser with the matching CustomerNumber off of the AccessUserAddress. In our case AccessUserCustomerNumber is the key to mapping our addresses to DW users, but we don't have the AccessUserID in our Address file, as it comes from D365. Could we use the @Code scripting to look up the UserId off of the AccessUser table during the import process?
Or another way to have the UserId on the newly imported address match the AccessUser record based on AccessUserCustomerNumber? If we just map AccessUserCustomerNumber to AccessUserAddressUserId, because it is a required field, we end up with the addresses going to the wrong records since some CustomerNumbers match UserIds in the AccessUser table.
Any help here would be appreciated.
Version: 10.20.11