- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2015 01:26 PM
Hi SN developers,
How are you mapping or calculating this field from LDAP location related fields?
Thanks for your input.
Jesus
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2015 12:17 AM
Thank you Shashank for giving reference of the blog for LDAP.
Jesus Melendez, User attributes object stores Location information across different AD attributes like st (for state), c (for country), physicaldeliveryofficename (for City) and streetaddress for (Street).
I have created a transform map so that, based on these attributes, map will automatically create a parent child relationship across different attributes.
e.g. Country would be the parent for state and state would be the parent for city and so on.
Moreover, when you open up the user record, on the location field, you will have it displayed as the combination of (streetaddress + city + state). I have also taken care of any of these 3 missing entries. For that I had to create 2^3 = 8 combinations of if and else statements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2015 02:14 PM
we had the AD group load those fields from their ldap feed into fim.. and we synch with fim we feed from there.. you can do the same in AD assuming your admin group has a feed from hr into ad... you just need the source field names to map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2015 02:23 PM
There is not a location attribute/field in AD but you do have location related fields in AD -address, city, postal code, etc. How are you making up the "Location" information for each user in ServiceNow??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2015 09:30 PM
Hi Jesus,
The way I have handled this type of situations on which you have related information to a reference field such as Location is by handling the transformation within the script field of the transform map.
As an example, you could you something like:
var locationSysID = ldapUtils.addLocation(source.u_field1, source.u_field2);
if (JSUtil.notNil(locationSysID)) target.location = locationSysID;
where:
a) addLocation is your own custom method created in a Script Include. In this case created within the ldapUtils script include. This custom method should handle the situation to create or to update the Location.
b) addLocation receives as parameter all the other fields you mentioned you have available in LDAP. Based on one of these you should be able to correlate or compute that what is or it's going to be the actual location name.
c) the addLocation function returns the sysid of the location created or updated, the one is later assigned to the user's location.
I hope this is helpful!
Saludos y bendiciones!
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2015 09:47 PM
Hi Jesus, would you mind if we can close this thread by marking the responses as helpful/correct?
Thanks,
Berny