Developer forum

Forum » Dynamicweb 10 » AccessUserAddress records inconsistently linked to AccessUserIds

AccessUserAddress records inconsistently linked to AccessUserIds

Skylar Kennedy
Reply

Hello,

Can you please provide the query used in the User provider to associate records in AccessUserAddress to AccessUser records, specifically, to populate AccessUserAddressUserId? I found that some are being properly associated and others are not, and seeing the query could help troubleshoot.

The records in blue are an example of this working, while the records in pink show the disconnect.

https://app.screencast.com/jVPcE5gfV62Em

Thank you,

Skylar Kennedy


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Skylar,
there is no direct SQL for the relations update, it works by finding the existing users using different conditions.
In the User destination provider there is an option called "User key field" which is set to "Auto" by default but you can change it to any other column that you are sure can be unique for the users(fx email). This column (if it exists in the mapping and in the "Source" for AccessUser table) will be used for searching of the existing users. The user addresses are imported after the users import. In the AccessUserAddress table mapping you need to specify the mapping for the destination column called: "AccessUserAddressUserID" and set the values from the source AccessUser "User key field" column values. Fx if you are using email as a user key field then you neeed to have in the fields ""AccessUserAddressUserID" values of users emails. At the addresses import the values for "AccessUserAddressUserID"s will be replaced by found users ids, if the user/users will not be found you will see warnings in the log file. When default "Auto" option is used then the search of existing users is made in this order:
"AccessUserID", "AccessUserUserName", "AccessUserCustomerNumber", "AccessUserEmail", "AccessUserExternalId"
BR, Dmitrij

Votes for this answer: 1
 
Skylar Kennedy
Reply

Hi Dimitrij,

Populating the User Key field in the address job resolved the issue. 

Thanks very much!

Skylar Kennedy

 

You must be logged in to post in the forum