Hi,
I had begin like this but they don’t work.
i change again to :
<dataset>
<name>accountExpires</name>
<policy>FORCE</policy>
<forceValues>
<string><![CDATA[js:AD.getAccountExpires(return_maxleavingdate(srcBean.getDatasetFirstValueById("description")),"yyyyMMdd")]]></string>
</forceValues>
</dataset>
</propertiesBasedSyncOptions>
<scriptInclude>
<string>accountexpirationdate.js</string>
</scriptInclude>
</task>
</tasks>
</lsc>
and i have error message to :
root@ldap:/etc/lsc/supann2ad# /usr/bin/lsc -f /etc/lsc/supann2ad -t1 -s all -n
……
févr. 01 13:36:45 - INFO - Starting sync for FromSupannToAD
févr. 01 13:36:45 - ERROR - Fail to compute expression:
AD.getAccountExpires(return_maxleavingdate(srcBean.getDatasetFirstValueById("description")),"yyyyMMdd")
on id=uid=utest002,ou=people,dc=xxxx,dc=xx
Reason: javax.script.ScriptException: sun.org.mozilla.javascript.EcmaError:
ReferenceError: "return_maxleavingdate" n'est pas défini (<Unknown source>#5)
in <Unknown source> at line number 5
févr. 01 13:36:45 - ERROR - Error while synchronizing ID {uid=utest002}:
org.lsc.exception.LscServiceException: javax.script.ScriptException:
sun.org.mozilla.javascript.EcmaError: ReferenceError: "return_maxleavingdate"
n'est pas défini (<Unknown source>#5) in <Unknown source> at line number 5
févr. 01 13:36:45 - ERROR - All entries: 1, to modify entries: 0, successfully
modified entries: 0, errors: 1
root@ldap:/etc/lsc/supann2ad#
--
Pour toute demande de support informatique :
[email protected]
Pour une assistance à distance : cliquez ici
---
Vincent Lepetit
Administrateur Systèmes, Réseaux et Télécom
Tel : +33 176 218 318
Mob : +33 634 422 573
Paris Sciences et Lettres
60 rue mazarine
Paris, 75006
http://www.univ-psl.fr
> Le 1 févr. 2018 à 13:29, Clément OUDOT <[email protected]> a écrit :
>
> 2018-02-01 13:23 GMT+01:00 Vincent LEPETIT <[email protected]>:
>> Yes.
>>
>> I had put my script in the same place than my lsc.xml :
>> /etc/lsc/supanntoad/accountexpirationdate.js
>
>
>> <scriptInclude>
>> <string>supann2ad/accountexpirationdate.js</string>
>> </scriptInclude>
>
> This should be:
>
> <string>accountexpirationdate.js</string>
>
>
> The path is relative to lsc.xml file.
> _______________________________________________________________
> 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
_______________________________________________________________
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