getEmployeeId fails ("return empty string")

Sort:
You are not authorized to post a reply.
Author
Messages
Dave Amen
Veteran Member
Posts: 75
Veteran Member

    To all,

    Has anyone run into this error?

    I have a simple rule to match the employee number on the screen with the employee number in their Identity using getEmployeeId(), but Inquiry in the screen returns a security violation, and puts this into the lase_server log file:

    2010-10-05 09:34:33 com.lawson.lawsec.default.FINEST com.lawson.lawsec.author.runtime.JSUser.getEmployeeId()() function return empty string

    Any thoughts or suggestions are much appreciated!

    Best regards,
    Dave
    (303) 773-3535

     

     

    MattD
    Veteran Member
    Posts: 94
    Veteran Member
      Can you post the entire rule?
      Dave Amen
      Veteran Member
      Posts: 75
      Veteran Member

        Absolutely.

        I'm working with HR13. The original rule matched both the company and employee, but I've been cutting it down to bare bones to try and figure out what's happening. I'm testing with employee 11456, who has a perfectly configured employee identity. I found that with only the getEmployeeId in the rule, I get "token or bookmark not found", so I added more to the rule to be able to get to the blank HR13 screen. I tried the rule below to get something that worked - this works perfectly by itself:

        form.EMD_EMPLOYEE > 11450

        It allowed me to see "myself" as employee 11456 and everyone with bigger empnums, but below 11450 got security violations - perfect. When I add getEmployeeId in any manner, though, it fails:

        form.EMD_EMPLOYEE > 11450 && user.getEmployeeId() > 11450

        This gets a security violation when inquiring, next, previous, or whatever on HR13. And the log file shows "function return empty string" (sic). I'm thinking it's not a rule problem, but something else related to the employee identity configuration - and possibly the original installation. I've tried this on several different employees with the same result every time.

        John Henley
        Senior Member
        Posts: 3348
        Senior Member
          try: (form.EMD_EMPLOYEE > 11450) && (user.getEmployeeId() > 11450)
          Thanks for using the LawsonGuru.com forums!
          John
          Dave Amen
          Veteran Member
          Posts: 75
          Veteran Member

            We found it.

            I tried your suggestion, but still no difference - so we kept digging deeper. Turns out that the PRODLINE_EMPLOYEE Identity was wrong! The ProdLine is part of the the name of the identity, but there was one character difference between the old, retired ProdLine and the new and correct one. I was using the old PRODLINE_EMPLOYEE identity - which was the only one there - but which wasn't correct. It required some ssoconfig work to put the Identity for the new Prodline in place.

            Now the original rules work as they should. The key thing I now know: if the log shows "getEmployeeId()() function return empty string" or something similar, look CLOSELY at everything about the EMPLOYEE Identity!

            Matt and John - thanks for the quick responses!

            Best regards,
            Dave
            (303) 773-3535

            John Henley
            Senior Member
            Posts: 3348
            Senior Member
              I was going to suggest that but was afraid it might insult you :)=
              Thanks for using the LawsonGuru.com forums!
              John
              Dave Amen
              Veteran Member
              Posts: 75
              Veteran Member
                I appreciate the consideration for my feelings.
                I may not have been willing to accept what you wrote, but I'd never be insulted!

                And, of course, hopefully this string helps others who end up in the same boat.

                Best regards,
                Dave
                You are not authorized to post a reply.