Pass UserProfile Employee value into HR11 Employee Field

Author
Messages
Nabil
Veteran Member
Posts: 61
Veteran Member

    Hello All,

    I'm trying to create a Design Studio Form that auto inquires and pull some employee information once the employee access it.

    Is there a way to pass the portalWnd.oUserProfile.getAttribute("employee") into HR11 Employee field and set the form to inquire oninit?

     

    Thank you,

    Nabil

    Ragu Raghavan
    Veteran Member
    Posts: 468
    Veteran Member
      Something like this? You will need to default or set the company too.

      function FORM_OnInit()
      {

      var vEmployee = portalWnd.oUserProfile.getAttribute("employee")

      lawForm.setDataValue("EMP-COMPANY",1,0);
      lawForm.setDataValue("EMP-EMPLOYEE",vEmployee,0);
      lawformDoFunction("I");
      }
      John Henley
      Senior Member
      Posts: 3348
      Senior Member

        Here are other ideas.

        On the employee text field, you can set the default value to pull in the user's employee number from their portal profile variables, as well as set the field to output only.

        On the form properties, you can set the initial action to inquire

        Thanks for using the LawsonGuru.com forums!
        John
        Nabil
        Veteran Member
        Posts: 61
        Veteran Member
          Thank you Ragu and John. This worked very well!
          I had to use javascript to inquire on the form oninit() because the drop down 'Initial form action' doesn't display anything but None.
          ---