Hi Clement,


I have modified it accordingly but still getting below error.



Jan 29 15:29:28 - ERROR - Fail to compute expression:

             rjs:

                var membersSrc = 
srcBean.getDatasetFirstValueById("uniqueMember");

                var membersSrcDn = membersSrc.split(,);

                var membersDstDn = [];

                for  (var i=0; i<membersSrcDn.size(); i++) {

                   var memberSrcDn = membersSrcDn.get(i);

                   var uid = memberSrcDn;

                   var destDn = ldap.search("ou=Users,dc=testrjil,dc=net", 
"(sAMAccountName=" + uid + ")");

                   if (destDn.size() == 0 || destDn.size() > 1) {

                     continue;

                   }

                   var destMemberDn = destDn.get(0) + "," +  
ldap.getContextDn();

                   membersDstDn.push(destMemberDn);

                 }

                 membersDstDn



               on id=demogrp4

Reason: javax.script.ScriptException: 
sun.org.mozilla.javascript.EvaluatorException: syntax error (<Unknown 
source>#6) in <Unknown source> at line number 6

Jan 29 15:29:28 - ERROR - Error while synchronizing ID {groupname=demogrp4}: 
org.lsc.exception.LscServiceException: javax.script.ScriptException: 
sun.org.mozilla.javascript.EvaluatorException: syntax error (<Unknown 
source>#6) in <Unknown source> at line number 6



Any idea?



-Hardik



-----Original Message-----
From: Clément OUDOT [mailto:[email protected]]
Sent: 29 January 2015 14:33
To: Hardik V Shah
Cc: lsc-userslsc-users
Subject: Re: [lsc-users] user add/remove to group in AD



2015-01-29 9:56 GMT+01:00  
<[email protected]<mailto:[email protected]>>:

> Hi Clement,

>

>

>

> Ok. But in my case, I have mysql as source instead of ldap so I am

> planning to supply list of members as below:

>

>

>

> | uniqueMember           |

>

> +------------------------+

>

> | hvshah,hvshah1,hvshah2 |

>

> +------------------------+

>

>





In this case, you have only one value for attribute uniqueMember. So use 
getDatasetFirstValueById.



Use the 'split' to map your value to an array of values:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split





Clément.
"Confidentiality Warning: This message and any attachments are intended only 
for the use of the intended recipient(s). 
are confidential and may be privileged. If you are not the intended recipient. 
you are hereby notified that any 
review. re-transmission. conversion to hard copy. copying. circulation or other 
use of this message and any attachments is 
strictly prohibited. If you are not the intended recipient. please notify the 
sender immediately by return email. 
and delete this message and any attachments from your system.

Virus Warning: Although the company has taken reasonable precautions to ensure 
no viruses are present in this email. 
The company cannot accept responsibility for any loss or damage arising from 
the use of this email or attachment."
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to