Upgrade SM 9.52 to SM 9.71 ERROR JSCALL

 

There is a call to a javascrip as follows:
jscall("JS.function1.function2",parameter) of a record in the notifications table where function2, is a function inside function 1. When migrating Service Manager 9.52 to 9.71, this syntax generates an error message stating that the function does not exist. Is there a way to translate this syntax in the new version?


Top Replies

  • 0  

    Hello,

    Have you tried to call directly the script2?

    Using the syntax:

    jscall("JS.function2",parameter)

    Thanks

  • 0   in reply to LPPFR

    Hi!. Thanks for the suggestion. I try and the error is same, so, I seeing the JavaScript called, in the following line:

    callrad("us.notify", ["name", "record","names",], ["tmx.dt.chm.NotiOpertelIniImp", obj_Opertel]);

    Customer says it work fine on SM 9.52. 

    The error on SM 9.71 is:

    20/01/2023 10:11:32, No se puede evaluar la expresión (us.notify,process.msg,enviaNotificacionStatusImp@'TmxDtChmOpertel':1109:6)
    20/01/2023 10:11:32, Arg. erróneo (2) oper. = (us.notify,process.msg,enviaNotificacionStatusImp@'TmxDtChmOpertel':1109:6)
    20/01/2023 10:11:32, No se puede evaluar la expresión (us.notify,process.msg,enviaNotificacionStatusImp@'TmxDtChmOpertel':1109:6)
    20/01/2023 10:11:32, No se puede evaluar la expresión jscall("TmxDtChmOpertel.enviaNotificacionStatusImp.generaCuerpoOpertelStatusImp", tmxdtchmOpertelAfectado={["CA2301_100005", "CIE CA", '10/01/2023 08:46:52', , , , , , , "CASE-CAO-CARN-GNOC", "CIE@TELMEX.COM;ABC.INT@reduno.com.mx; mcao@telmex.com", 1, "SI"]}) (us.notify,process.msg,enviaNotificacionStatusImp@'TmxDtChmOpertel':1109:6)
    20/01/2023 10:11:32, La función de biblioteca JS (TmxDtChmOpertel.enviaNotificacionStatusImp.generaCuerpoOpertelStatusImp) no existe (us.notify,process.msg,enviaNotificacionStatusImp@'TmxDtChmOpertel':1109:6)
    20/01/2023 10:11:32, No se ha podido procesar el script. RAD: us.notify return error.
    20/01/2023 10:11:32, Error irrecuperable en la aplicación: scmessage en panel process.msg

    Thanks for suggestions.
  • Suggested Answer

    0   in reply to LidaTCerquera

    Hello,

    Your jscall specify 2 elements for the function it cannot work

    jscall("TmxDtChmOpertel.enviaNotificacionStatusImp.generaCuerpoOpertelStatusImp", tmxdtchmOpertelAfectado={["CA2301_100005", "CIE CA", '10/01/2023 08:46:52', , , , , , , "CASE-CAO-CARN-GNOC", "CIE@TELMEX.COM;ABC.INT@reduno.com.mx; mcao@telmex.com", 1, "SI"]})

    The correct jscall should be:

    jscall("TmxDtChmOpertel.enviaNotificacionStatusImp", tmxdtchmOpertelAfectado={["CA2301_100005", "CIE CA", '10/01/2023 08:46:52', , , , , , , "CASE-CAO-CARN-GNOC", "CIE@TELMEX.COM;ABC.INT@reduno.com.mx; mcao@telmex.com", 1, "SI"]})

    or

    jscall("TmxDtChmOpertel.generaCuerpoOpertelStatusImp", tmxdtchmOpertelAfectado={["CA2301_100005", "CIE CA", '10/01/2023 08:46:52', , , , , , , "CASE-CAO-CARN-GNOC", "CIE@TELMEX.COM;ABC.INT@reduno.com.mx; mcao@telmex.com", 1, "SI"]})

    Thanks