question on LDAP Integration

Community Alums
Not applicable

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,

PriyaSm_0-1699613597533.jpeg

 

PriyaSm_1-1699613597534.jpeg

 

 

Thanks,

1 REPLY 1

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Community Alums ,

 

You can write an onStart script in Transform map which will check if the records are present in the table it wont do anything but if they are not then create 1st in der & then insert update record in User table. You can try script like below. You need to do this for both tables so inside 1 script u can check for both tables in the below way.

 var gr = new GlideRecord('cmn_department');
    gr.addQuery('name', source.u_department);
    gr.query();
    if (gr.next()) {

    } else {
        gr.initialize();
        gr.name = source.u_department;
        gr.insert();
    }

 

Thanks,

Danish