convert user to contact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2020 06:02 AM
We have a need to convert an existing User record to a Contact.
We wrote a script that would identify these User records as they are created and it updates the class on the sys_user = 'customer_contact'.
While the update works, the corresponding customer_contact row is not created. This leaves the user row in a bad state. You can no longer view the record in the gui - it returns record not found due to the missing customer_contact row.
I've tried writing a script to insert the customer_contact row with the same sys_id as the sys_user record. This fails with a primary key violation. Not surprising as it should be trying to also insert a sys_user record with the creation of the customer_contact row. Where it already exists, that creates the primary key violation.
We are not able to change how these users are created initially - they are being automatically created by SN when an email is received. I know, not good. But we are stuck with this. Too much built upon it to untangle.
Anyway.. I've figured out a lot of ways that won't fix this. I need your help. How can we convert the existing User records to Contacts so that the customer_contact row is created for them?
Thanks in advance...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2021 01:02 AM
Hi there,
Here is the simple way,
Step 1: Go to users list
step 2: Personalize list [edit gear icon] and add 'Class' field to the list and save
step 3: Edit Class value from 'User' to 'Contact' [as shown below]
step 4: It is converted as contact, now you can navigate to contacts and find this contact in the list.
NOTE: 1. We can also change a 'Contact' as 'User' by following the above steps.
2. A contact will store in Contact table and User table as well, since it is extended from User table.
- If my answer helps you, please mark it as "Correct Answer"
Regards,
Ibrahim