Hi,

I had write a javascript to make a process in one of my dataset.

I had followed this page to declare my script in lsc.xml :
https://lsc-project.org/documentation/latest/scripting/start

my function name : return_maxleavingdate
This function work on « description »  source ldap attribute

And i call my function like this :

<dataset>
     <name>accountExpires</name>
           <policy>FORCE</policy>
                 <forceValues>
                     
<string>js:AD.getAccountExpires(return_maxleavingdate(srcBean.getDatasetFirstValueById("description")),"yyyyMMdd")</string>
                  </forceValues>
 </dataset>

or like this :

<dataset>
     <name>accountExpires</name>
           <policy>FORCE</policy>
                 <forceValues>
                     
<string><![CDATA[js:AD.getAccountExpires(return_maxleavingdate(srcBean.getDatasetFirstValueById("description")),"yyyyMMdd")]]></string>
                  </forceValues>
 </dataset>

but when i call my function  i had this error messages :

févr. 01 12:24:43 - ERROR - Fail to compute expression: 
AD.getAccountExpires(return_maxleavingdate(srcBean.getDatasetFirstValueById("description")),"yyyyMMdd")
 on id=uid=utest002,ou=people,dc=univ-psl,dc=fr
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 12:24:43 - 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

Could you tell me what is wrong ?

-- 
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

_______________________________________________________________
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