Symantec IGA

 View Only
  • 1.  Logging to server from validation javascript

    Posted Jan 05, 2017 06:53 AM

    I have a task on the screen definition , for an attribute I have written a Validation Javascript. The script works fine and the user sees the message if there is a validation failure.

     

    However if I need to log message to the server on validation failure how do I do that from the validation javascript.

     

    I tried using :

     

    ...pout = Packages.java.lang.System.out;

     

    ......

    else{ pout.println("Wrong value entered by the user"+userID);
    errorMessage.reference='Wrong value chosen' + attributeValue;
    return false;}

     

    The statement "errorMessage.reference='Wrong value chosen' + attributeValue;" works great but the pout.println doesnt.

     

    #Identity Manager



  • 2.  Re: Logging to server from validation javascript
    Best Answer

    Broadcom Employee
    Posted Jan 05, 2017 08:25 AM

    Hi,

     

    Plz check if you can use one of the following method inside Validation JS. This will print the msg inside App Server log:

     

    ScreenContext.logWarningMessage("For printing ...",true);

    FieldContext.logWarningMessage("For printing ...",true);

     

    Regards,

    Sumeet

     



  • 3.  Re: Logging to server from validation javascript

    Posted Jan 05, 2017 10:26 AM

    I had used it befor ebut had not got the message in log but now realized somethign was wrong with the logging and now I see the message in the log. Thanks for the confirmation , I used the FieldContext.logWarningMessage.