PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12/15/2017 4:13 PM by  Nabil
Pass UserProfile Employee value into HR11 Employee Field
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Nabil
Programmer/Analyst
St. Luke's Health System
Veteran Member
(131 points)
Veteran Member
Posts:59


Send Message:

--
12/12/2017 3:02 PM

    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
    Private
    Private
    Veteran Member
    (878 points)
    Veteran Member
    Posts:306


    Send Message:

    --
    12/12/2017 4:18 PM
    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
    Private
    Private
    Senior Member
    (9629 points)
    Senior Member
    Posts:3227


    Send Message:

    --
    12/13/2017 7:33 AM

    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
    Programmer/Analyst
    St. Luke's Health System
    Veteran Member
    (131 points)
    Veteran Member
    Posts:59


    Send Message:

    --
    12/15/2017 4:13 PM
    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.
    You are not authorized to post a reply.