Le 20/04/2017 à 16:55, ℜ Christian Iuga a écrit :
Hi,

I'm trying to sync GroupOfNames with lsc

this line work :

      
<string>js:srcBean.getDatasetFirstValueById('member').replace("dc=XXX,dc=XXX","dc=YYY,dc=YYY")</string>

but give only one line of the source (indeed as it's the FirstValue )

if i replace getDatasetFirstValueById with getDatasetValuesById is not
working at all :

      
<string>js:srcBean.getDatasetValuesById('member').replace("dc=XXX,dc=XXX","dc=YYY,dc=YYY")</string>

i got a error when create the sync :

avr. 20 16:45:59 - ERROR - Fail to compute expression:
srcBean.getDatasetValuesById('member').replace("dc=XXX,dc=XXX","dc=YYY,dc=YYY")
on id=cn=external-solar,ou=Group,dc=allclient,dc=com
Reason: javax.script.ScriptException:
sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot find
function replace in object [uid=jpt,ou=...., uid=cia,ou=....].
(<Unknown source>#3) in <Unknown source> at line number 3

i have saw a similar issue in mailing list :

https://lists.lsc-project.org/pipermail/lsc-users/2015-January/002376.html

but it's look over-complex for this simple usage ...

Hello Christian,

getDatasetValuesById returns an Array and getDatasetFirstValuesById returns a String, so you can't use same method on both.

See this tutorial about group synchronization: https://lsc-project.org/documentation/tutorial/synchronizegroups

--
Clément OUDOT
Consultant en logiciels libres, Expert infrastructure et sécurité
Savoir-faire Linux
137 boulevard de Magenta - 75010 PARIS
Blog: http://sflx.ca/coudot

_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users

Reply via email to