Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
User Experience
Lawson Design Studio
Employee photo on HR11
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Hitman
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5208
People Online:
Visitors:
384
Members:
0
Total:
384
Online Now:
New Topics
Lawson S3 HR/Payroll/Benefits
Post Tax Benefit Plan Table
11/14/2024 9:16 PM
Hi, totally new to Laswon. I have a repor
Lawson S3 Procurement
ED501 Error: Map 850 not supported by /law/c15vda/lawson/test10/edi/bin/laws_out_91
11/12/2024 3:47 PM
Tried runnning ED501 and getting the atathced erro
Lawson S3 HR/Payroll/Benefits
Error
11/6/2024 9:54 PM
When I try to enroll a retiree in 72.1 health plan
Infor ERP (Syteline)
Syteline: New Data Maintenance Wizard (Error) Need help
11/1/2024 4:24 PM
Hi, I need help with an error on syteline while us
Dealing with Lawson / Infor
Implementing Lawson v10 with Cerner Surginet, Case Cart Picking, and Quick Adds for the OR
10/29/2024 4:20 PM
Hi Everyone, I am wondering if there is any org
Lawson S3 HR/Payroll/Benefits
Canada Tax Calculation (Federal and Provincial) Issue
10/23/2024 5:00 AM
Initially, we had problem with CPP2 calculation is
Lawson S3 HR/Payroll/Benefits
CA Section 125 401k Plan
10/22/2024 10:13 PM
Does anyone have any recommendations on how to fac
S3 Systems Administration
Running AC120 deleted records from ACMASTER table
10/22/2024 3:40 PM
We recently ran the AC120 as normal and somehow it
Lawson S3 Procurement
RQ13 Approval Info
10/17/2024 2:12 PM
When a Requisition is approved on RQ13, what table
S3 Customization/Development
Read and Write CSV file COBOL
10/9/2024 2:53 PM
Does anyone have a quik example of a program that
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3291
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1372
Roger French
1315
mark.cook
1244
Forums
Filtered Topics
Unanswered
Unresolved
Announcements
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
User Experience
Lawson Design Studio
Employee photo on HR11
Please
login
to post a reply.
9 Replies
0
Subscribed to this topic
12 Subscribed to this forum
Sort:
Oldest First
Most Recent First
Author
Messages
wilcoxmad
Veteran Member
Posts: 87
5/17/2010 1:51 PM
I want to add code to our custom HR11 screen that will show the employee photo. Anyone done this?
wilcoxmad
Veteran Member
Posts: 87
5/19/2010 2:23 PM
Ok, I found an example in the Lawson Design Studio Users Guide. It looks something like this:
-----------------------------------------------
var sEmp = lawForm.getFormValue("text2");
sPath = "/law1/ca/lawson/persistdata/lawson/portal/content/images/"+sEmp+".jpg";
var imgElem = lawform.getFormElement("image1");
if (imgElem)
{
imgElem.src = sPath;
imgElem.style.visibility = "visible";
}
-------------------------------------------------
I am getting a message "LawForm is Undefined". And it points to the above lawform.getFormElement.
Any suggestions?
David Williams
Veteran Member
Posts: 1127
5/19/2010 2:34 PM
lawform.getFormElement should be lawForm
wilcoxmad
Veteran Member
Posts: 87
5/19/2010 2:37 PM
Thanks David, that was it.
Not that it is working, but no more error.
David Williams
Veteran Member
Posts: 1127
5/19/2010 2:49 PM
Do you actually have images loaded?
Do an alert(sPath) to see what your call looks like to make sure it's clean.
wilcoxmad
Veteran Member
Posts: 87
5/21/2010 11:43 AM
How strange an adventure this has been! Figuring out where to place the .jpg files so Lawson will find them has been quite a challenge.
The address $LAWDIR/persistdata/lawson/portal/content/images is where you put an image if you want to assign just one image to the form. Like if you wanted to show a company logo or something like that. You then assign it to the image you define in DS as the source, not in the JS.
However if you want to build a variable and assign it on the fly, you need to put the images in the $LAWDIR/htdocs/lawson/images directory. However when building your path in JS, use "/lawson/images/filename.jpg" as the directory/filename.
I don't know how much of this is consistent across all UNIX platforms and how much is specific to our Lawson setup. I just know this has been a real adventure! :-)
Now with all that said, has anyone used something like this but called the pictures from a web address instead of from the UNIX box itself? That is what I would like to be able to do because our badge photo's are on another server within our firewall and I would rather pull them directly from there rather than having to develope a process to pull them over to our UNIX server.
Matt
Basic Member
Posts: 13
6/1/2010 11:42 AM
We have created a button on one of our custom applicant screens (PA31) that calls a simple Classic asp page that we developed that displays applicant photos. The applicant number is dynamically populated as a querystring.
function BUTTON_OnClick(id, row)
{
var strURL = "http://production/laprod/PhotoUpload//DisplayPhoto.asp?ID=" + sAppID
window.open(strURL,"PCT_Photo","fullscreen=no,location=no,menubar=no,width=280,height=400,resizable=no,scrollbars=no,status=yes,toolbar=no")
}
I hope this helps. I can give more details in how it works if you need it.
Matt
LisaN
Veteran Member
Posts: 53
6/1/2010 2:24 PM
Don't know if this helps you but through MSS the employee photos can be viewed under their direct reports:
The photos have to have the naming convention of "P
.jpg (I think you need leading zeroes in the EE#)
The photos need to be in "WEBDIR/lawson/hrnet/images/employees
I found that you can adjust the image size by modifing manager.htm in the "htdocs/lawson/xhrnet" folder.
I also thought there was an option to have the images displayed on HR11.
Frank Z
Advanced Member
Posts: 32
6/2/2010 1:33 PM
Here is the script I am using for this, and having one small issue - I can't lock the image into place and keep a consistent size. When our HR dept takes the pic, they are regularly cropped (and they don't lock the aspect ratio during cropping). This leads to very un-flattering photos being placed into portal if you use an absolute size. I hope I worded that coherently... Anyway, here goes:
function FORM_OnInit()
{
//set the style for image control
var imgElem=lawForm.getFormElement("image1");
if (imgElem)
{
imgElem.style.visibility = "hidden";
imgElem.style.top = "4px";
imgElem.style.left = "50%";
imgElem.style.height = "20%";
imgElem.style.height = "20%";
}
}
function FORM_OnAfterTransaction(data)
{
//was transaction successful?
if (formState.agsError)
return;
// pad image names with zeroes for company and employee names
// company is 4 chars, employees are 9
sEmployee = lawForm.getDataValue("EMP-EMPLOYEE",0);
sCompany = lawForm.getDataValue("EMP-COMPANY",0);
sCompany = portalWnd.strFillChar(sCompany,4,"left","0");
sEmployee = portalWnd.strFillChar(sEmployee,9,"left","0");
// build IMG url and set the control source
sEmployee = "P" + sCompany + sEmployee;
sPath = "/lawson/xhrnet/images/employees/"+sEmployee+".jpg"
var imgElem = imgElem=lawForm.getFormElement("image1");
if (imgElem)
{
imgElem.src = sPath;
imgElem.style.visibility = "visible";
}
}
wilcoxmad
Veteran Member
Posts: 87
6/14/2010 12:33 PM
Thanks all!
I'm still looking for a way to address the photo's from a web server and load them directly to the form on an inquiry action. My users don't want a pop-up. I have been successful at pulling them from a Unix directory. Again the problem there is I would have to come up with a process to update the Unix daily with new employee's photos. I would much rather be able to pull them from the network server that already contains the photos.
Please
login
to post a reply.