Successful log in events

オフライン
hello I am trying System Events -Successful log in. I am working on below method. //Store Last Successful Login Name Item itm = this.newItem("Variable", "edit"); itm.setAttribute("where", "[variable].name='LastLogin'"); itm.setProperty("value", eventData.LoginName); itm.apply(); //Create System Events Log CCO.Utilities.CreateSystemLogRecord("SuccessfulLogin", "onSuccessfulLogon", eventData.LoginName, "Login Successful"); return this; its shows error- Details in 6 temporary files C:\Program Files (x86)\Aras11\Innovator\Innovator\Server\dll\4nvdddif Line number 4, Error Number: CS0103, The name 'eventData' does not exist in the current context Line number 7, Error Number: CS0103, The name 'eventData' does not exist in the current context. Anybody please tell me
Parents
  • Hi Sanu,

    I'm a ARAS newbie and I copy the code from your post and I used the new CCO.SystemEventLogger.CreateSystemLogRecord because the CCO.Utilities.CreateSystemLogRecord is deprecated now.

    I assume it write a line when a user logon in "System Event Log", but I don't find any log line. What's wrong in my assumption?

    Thank you for help.

    //Store Last Successful Login Name
    Item itm = this.newItem("Variable", "edit");
    itm.setAttribute("where", "[variable].name='LastLogin'");
    itm.setProperty("value", eventData.LoginName);
    itm.apply();

    //Create System Events Log
    //CCO.Utilities.CreateSystemLogRecord("SuccessfulLogin", "onSuccessfulLogon", eventData.LoginName, "Login Successful");
    CCO.SystemEventLogger.CreateSystemLogRecord("SuccessfulLogin", "onSuccessfulLogon", eventData.LoginName, "Login Successful");
    return this;

  • On another note as well you need to make sure that you have permissions to update the variable. In our instance it would not work for non admin users.

Reply Children
No Data