Message Pop Up using Javascript in a Rule SM 9.34

Hi , I'm working with SM Version: 9.34.2003 build P2  and I've been reading this post :

/t5/Service-Manager-Service-Center/Pop-Up-Message-Box-Use-Javascript/m-p/6777873#M127999

because I'm trying to validate a date field against the calholidays table and the messages must be validation type not information only, for the user to change the date properly.

I attach the javascript code.  Perhaps I'm doing it wrong and "Message Box : eval script" is not available in SM 9.34   or  there's another way to do it (or there's no way).

Thanks in advance

 

Parents
  • Could try this if you don't use PD. 

    function domessageBox(message)
    {

    if(vars.$G_bg || vars.$L_bg || system.functions.nullsub(vars.$G_ess, false))
    {
    print(message);
    return;
    }

    var rteReturnValue = new SCDatum();
    var argNames = new SCDatum();
    var argVals = new SCDatum();
    argVals.setType(8); //type array
    argNames.setType(8); //type array
    var argVal;

    argVal=new SCDatum();
    argVal.setType(2); //string
    argVal="text";
    argNames.push(argVal);

    argVal=new SCDatum();
    argVal.setType(2); //string
    argVal=message;
    argVals.push(argVal);

     system.functions.rtecall("callrad",
    rteReturnValue,
    "mb.ok", //RAD app name
    argNames,
    argVals,
    true); //false to run in same thread, true to run in new thread
    }

    mb.ok is the rad app for a messag box. 

     

Reply
  • Could try this if you don't use PD. 

    function domessageBox(message)
    {

    if(vars.$G_bg || vars.$L_bg || system.functions.nullsub(vars.$G_ess, false))
    {
    print(message);
    return;
    }

    var rteReturnValue = new SCDatum();
    var argNames = new SCDatum();
    var argVals = new SCDatum();
    argVals.setType(8); //type array
    argNames.setType(8); //type array
    var argVal;

    argVal=new SCDatum();
    argVal.setType(2); //string
    argVal="text";
    argNames.push(argVal);

    argVal=new SCDatum();
    argVal.setType(2); //string
    argVal=message;
    argVals.push(argVal);

     system.functions.rtecall("callrad",
    rteReturnValue,
    "mb.ok", //RAD app name
    argNames,
    argVals,
    true); //false to run in same thread, true to run in new thread
    }

    mb.ok is the rad app for a messag box. 

     

Children
No Data