User Id on sys_user table is not updating, why?

praaaaaaaa
Kilo Contributor

I am trying to load user records from AD.

It is creating user records in servicenow but User ID field on sys_user table is not updating as there is a record with same User ID value and giving Unique key violation. I understood that the field is Unique field.

So I modified User Id value of Old record and tried to update the newly added user record but it is still not updating the newly added record with User ID value even there is no other record with the same value.

 

Please help me here. also attaching images for referrence.

 

find_real_file.png

find_real_file.png

6 REPLIES 6

Shishir Srivast
Mega Sage

What do you have in source user_name Script?

praaaaaaaa
Kilo Contributor

that I checked in Import set table whether that field has any value or not. But It has the value and the field  is sAMAccount from AD.

also I put log in Transform scritp whether it is pulling the value or not. it is i mean user id value printing  in log.

Not sure why do you need to have a script to check if source has value or not that i think that should be taken care of by it's own if you have "Copy empty fields" checkbox unchecked on transform map.

Can you just run the transform map without script for source user_name field and try. Let us know.

praaaaaaaa
Kilo Contributor

we need to ignore the value if user id has some specific value that is why i wrote a script to avoid that record to insert.

 

example if user name like ashok.sa, varma.pk, linga.ed

then need to avoid those above kind of records otherwise need to insert the record.