An empty record is inserting into "core_company" table through a LDAP transformer

Devi12
Giga Guru

Hi,

There is a "core_company" table for storing company data. There are empty records inserting into this table through a  LDAP transform map and empty record only having the "vendor manager" field updated with the location field "hospital,Inc" which is inactive in location table. This Transform map is for importing users from LDAP server. I am not able to figure out why it is inserting empty records into "core_company" table. I checked the mapping, "u_company" is mapped with both "location" and "company". The configurations are same in QA and PROD. There is no issues with QA and PROD. Not able to find the reason for inserting records into company table.

Here I am attaching the screenshots of transform map:

How can I resolve this one?

Thanks in Advance!

1 ACCEPTED SOLUTION

Devi12
Giga Guru

Thank you Bammar for you reply!

Finally I sought out this one. For the field "Vendor manager" display is made as true. That is the reason it is creating empty records in core_company table. It is false in QA and PROD. I make it as false, no records were inserting.

View solution in original post

2 REPLIES 2

bammar
Kilo Sage
Kilo Sage

Ok I want to sort of put some clarifying assumptions here- LDAP is populating and updating users into ServiceNow-- one of the fields in the user table is a reference to company of the user stored in another table.  Some of these may be throwing things at the wall and seeing what sticks but if any help to get closer to solution then great

1. I think what is really happening is the following- it finding the first record ( the hospital) in the table with a "" value on it- if you delete the hospital and try again it will most likely latch on to another inactive record with mostly blank attributes. - if you check the transfrom map table record you can actually see what is being passed from ldap to servicenow transform map table this will clarify everything

2- One confusing thing is im seeing u_company mapped to location in one screen shot and another u_company mapped to vendor/ 

3. The company field when looking up a user is a reference field- so that tells me that you will find your record by locating the sys id.

How I would do that....  I would literally go to the transform map table- get into the view where you can see the list/form view and make an on Insert BR- In thqat BR I would get the text value of the company you are looking for (u_company coming in from LDAP)- then write a script to glidequery active Vendors with that name and get a sys id  - THEN I would make a new reference field to Vendor table in transform map table that wont come from LDAP but you will populate the sys id you get  - THEN go back to the transform map and use your reference field to map to vendor- 

I have definitly seen this issue before- as to why it behaives differently in test and prod... maybe there are different records in prod- also maybe the primary default vendor field that shows up in the reference field of company is different in test?

 

 

Devi12
Giga Guru

Thank you Bammar for you reply!

Finally I sought out this one. For the field "Vendor manager" display is made as true. That is the reason it is creating empty records in core_company table. It is false in QA and PROD. I make it as false, no records were inserting.