Pass UserProfile Employee value into HR11 Employee Field

 3 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Nabil
Veteran Member Send Private Message
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 Send Private Message
Posts: 477
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
Send Private Message
Posts: 3351

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 Send Private Message
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.