Question on LDAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2023 02:51 AM
Hi All,
I have imported user via ldap and transformed map I have mapped name ,email , department and company field those are working fine but here I want to update cmn_department table and core_company table so what should I do in transformed map to get auto update company and departments in user table automatically once the user company and department gets changes in azure AD , can anybody help me on this.
Please find the below snapshot,
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2023 03:01 AM
Hi @Mani60 ,
You have to gliderecord the company and department table depends on source table and set in target table
var department = source.department;
var company = source.company;
if (department) {
var departmentGR = new GlideRecord('cmn_department');
if (departmentGR.get('name', department)) {
target.department = departmentGR.getUniqueValue();
}
if (company) {
var companyGR = new GlideRecord('core_company');
if (companyGR.get('name', company)) {
target.company = companyGR.getUniqueValue();
}
Please mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand