A user may run into the following error when trying to delete a website user record in B2B admin.
This is a meaningful error that is thrown when there is an existing dependency on that user in the commerce system.
At this time there are only two options:
- Deactivate the user
- Remove the user via SQL script.
To deactivate the user please follow the documentation here. Optimizely recommends this approach.
If it is a business requirement that this user be deleted in this state, then your partner or in-house SQL admin will have to create a deletion script to remove all the referential data in the database for this user record.
In order to find the foreign key constraint to remove the user, a copy of the database is needed and the delete will need to be debugged. Usually, the constraint is because a user has initiated an order on the site. A script to remove and replace the user on the orders they are linked to would resolve that issue.
B2B Commerce Support can provide a copy of the database if needed, or a request can be placed into Technical Support Services to run the supplied script on the correct environment.
Article is closed for comments.