Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Human Capital Management
Lawson S3 HR/Payroll/Benefits
Update HR11 User Fields from Portal?
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Wayne Willis
Past 24 Hours:
0
Prev. 24 Hours:
2
Overall:
5190
People Online:
Visitors:
0
Members:
0
Total:
0
Online Now:
New Topics
Lawson Landmark
Executing IPA from PR160
5/3/2024 2:46 PM
We're facing a situation where we need to upda
IPA/ProcessFlow
Executing IPA from PR160
5/3/2024 2:46 PM
We're facing a situation where we need to upda
S3 Customization/Development
Cobol - Extract Current Time
4/24/2024 7:21 PM
How do you extract just the Current System Time in
Lawson Landmark
LPL INSTR Functions
4/5/2024 8:32 PM
I'm writing a simple report using the Create R
Infor SCM
Translating 856 to get the ~ REF^CN^ field
4/3/2024 8:24 PM
We are trying to get the tracking number which is
IPA/ProcessFlow
Sample XML file create Flow
4/3/2024 3:43 PM
Hello everyone, I am new to creating XML files
Lawson S3 HR/Payroll/Benefits
bn105 error message
3/26/2024 6:40 PM
I need to change some of the set ups in our Life I
IPA/ProcessFlow
IPA executing Job
3/13/2024 7:08 PM
New to the IPA world and was wondering, can an IPA
Lawson S3 HR/Payroll/Benefits
Life Age Reduction on benefits plans
3/12/2024 7:15 PM
For our optional life we have an age based coverag
Lawson S3 HR/Payroll/Benefits
BN53.1 Add-In
3/7/2024 3:31 PM
We are migrating to Solstice. They require a
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3288
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1351
Roger French
1311
mark.cook
1244
Forums
Unanswered
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Lawson S3 HR/Payroll/Benefits
Update HR11 User Fields from Portal?
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Author
Messages
phanna@ghs.org
Basic Member
Posts: 4
3/3/2006 7:16 PM
We need to allow employees to update a single user field on HR11 from Portal ESS. Can this be done?
Can we use Javascript to make an AGS call to update the user field?
If not, can we store the employee input on a file in some UNIX directory (by using Javascript) and later update via batch?
(I am a Javascript novice).
There is of course the Personnel Actions form in Portal, but this is available only to Managers.
We are using Lawson Env 8.0.2.9, Portal 3.0.9.1, on a UNIX IBM AIX 5.2 machine.
Thanks for any clues,
Paul
John Henley
Senior Member
Posts: 3349
3/3/2006 9:07 PM
In order to make AGS calls, you have to have a back-end form that does the work. Ironically, Lawson doesn't have one for the HR user fields. Check my article (see
https://www.danalytics.co...archive/2005-12.htm)
on using the Excel uploads for updating HR user fields, and you'll see an alternative to using HR11--creating your own back-end form (see my screen shot here: https://www.danalytics.com/guru/letter/archive/2005-12_files/addins6.gif)
You would then need to modify whatever the HTML pages in ESS on which you wanted to display, capture and update the user fields. As part of that process, I wrote a utility JavaScript module (i.e. 'update_user_fields.js') which does AGS calls against the custom form.
Hope that answers your question...
phanna@ghs.org
Basic Member
Posts: 4
3/6/2006 4:28 PM
John,
Thank you very much for your reply!
Some questions arise.
(1) Can one create a form (similar to your DA15.1) using Design Studio against HR11?
(No doubt you have more intricate methods.)
(2) Must the user enter key values? Or,
can the form allow entry of one user field value only, without requiring the user to specify key fields?
To be able to do that from ESS is basically what we need. Is it feasible?
Alex Tsekhansky
Veteran Member
Posts: 92
3/6/2006 6:20 PM
Hello, Paul!
I respectfully disagree with John on the inability to do it via AGS calls. If it is possible to do it via some form or a combination of forms (including form transfer, inquiry-first tasks etc.), it CAN be done via AGS calls, potentially more than one though. I have implemented things in the past (admittedly, using the ideas of others :-)) that modify data in Lawson using "indirect" calls (e.g. the ones with function pair codes, inquiry first, form transfers etc).
Moreover, if it can be done with Excel add-on in some way, you probably can do it with only 1 custom AGS call, that needs to be captured by a technique indicated in John's Excel add-on article (DEBUG switch on Portal works too).
John Henley
Senior Member
Posts: 3349
3/6/2006 7:16 PM
Alex, it's quite alright to disagree with me--that's what I'm here for!
BTW, I do agree that what Paul could be done via some AGS calls (which is how Excel ultimately does it). However, it would require a complicated AGS call (as well as a way [i.e. a DME call] to translate the field name to the field number). In the end, I think the COBOL form I offered as an alternative is a much more approachable solution. It can be called with either the field name OR number. And, since it's sitting on the back-end, it can be called either from AGS/Design Studio, ESS/MSS, and/or the Excel addins.
John Henley
Senior Member
Posts: 3349
3/6/2006 7:27 PM
Paul,
The technique I'm describing is a COBOL form on the application server that updates HRHISTORY. It can be called via AGS from Excel addins, as well as Design Studio, ESS/MSS, and Process Flow. One common misconception in the Lawson world is that Design Studio is the solution for everything...it can only be used to modify the Portal XML forms.
The user would only key the "data" value, the "key" (company/employee/fieldname) would be coded in the ESS Javascript AGS call that invokes the form.
phanna@ghs.org
Basic Member
Posts: 4
3/6/2006 9:23 PM
John,
Thanks for the information.
I have not been able to successfully code an AGS call from within a javascript.
I know that we must have the COBOL form (like you described) in place first.
But assuming we have such a form,
how would I obtain the user's employee ID,
and then format and invoke the AGS call in js?
If only I had one good example ...
Thank you for the help you've been so far.
Paul
John Henley
Senior Member
Posts: 3349
3/7/2006 3:07 AM
Here's an example. This particular function is called with a field name/value pair, and adds the user field. It then transfers control to a function called DspMsgDA15().
It helps if you understand the JavaScript syntax and browser object model, such as the "parent" object. Also remember that JavaScript is case-sensitive. It also helps if you understand how ESS is put together and that there are certain functions and objects that are available in ESS (such as AGSObject) that are callable from JavaScript. When ESS loads in the browser, a number of variables get set in the "parent" object in the browser. "prodline", "employee" and "company" are examples of those variables.
function UpdateUserFieldA(myFieldName, myFieldValue)
{
var object = new AGSObject (parent.prodline, "DA15.1")
object.rtn ="MESSAGE"
object.longNames = true
object.tds = false
object.event ="ADD"
object.field = "FC=Add"
+ "&HEU-EMP-APP=0"
+ "&HEU-COMPANY=" + parseFloat(parent.company)
+ "&HEU-EMPLOYEE=" + parseFloat(parent.employee)
+ "&HRU-FIELD-NAME=" + escape(myFieldName)
+ "&HEU-A-FIELD=" + escape(myFieldValue)
+ "&ADD-OVERWRITE-FLAG=Y"
object.func = "parent.DspMsgDA15()";
// object.debug = true;
showWaitAlert("Updating Employee information - Please Wait")
AGS(object, "bnreturn")
}
function DspMsgDA15()
{
if (lawheader.gmsgnbr == 000)
{
removeWaitAlert()
}
else
alert(self.lawheader.gmsg)
}
phanna@ghs.org
Basic Member
Posts: 4
3/7/2006 1:56 PM
John,
What can I say? but thank you very much for taking time to assist so generously.
You have been a tremendous help.
I have already discussed the various tips you offered, here and elsewhere on your website, with my coworkers and supervisor.
Thanks again,
Paul
DarrylS
New Member
Posts: 1
6/24/2009 4:39 PM
John,
I am working on something related to this thread...
I am creating a Self Service screen that updates HR11 user fields. I am trying to get AGS Javascript to work to do this. I modified you JS example above and I am trying to get the following to work:
//function UpdateUserFieldA(myFieldName, myFieldValue)
//{
var object = new AGSObject (authUser.prodline, "HR11.1")
object.rtn ="MESSAGE"
object.longNames = true
object.tds = false
//object.event ="ADD"
object.event ="CHANGE"
//object.index = "heuset2"
//object.key = "58" + "=" + "0" + "=" +
//escape(parseInt(authUser.company,10)) + "=" +
//escape(parseInt(authUser.employee,10))
//object.field = "FC=Add"
//object.field = "FC=A"
object.field = "FC=C"
+ "&HEU-FIELD-KEY=58"
+ "&HEU-EMP-APP=0"
+ "&HEU-COMPANY=" + parseFloat(authUser.company)
+ "&HEU-EMPLOYEE=" + parseFloat(authUser.employee)
//+ "&HRU-FIELD-NAME=" + escape(myFieldName)
//+ "&HEU-D-FIELD=" + escape(myFieldValue)
+ "&HRU-FIELD-NAME=UF-EMP-SMKR-CODE"
+ "&HEU-A-FIELD=" + escape(updateValue) //Y or N
+ "&ADD-OVERWRITE-FLAG=Y"
//+ "&XMIT-HREMP-BLOCK=1000000000"
//+ "&XMIT-REQDED=1"
+ "&EFFECT-DATE=" + formjsDate(fmttoday)
object.func = "parent.DspMsgHR11()";
//object.func = "parent.DisplayMessage()";
object.debug = true;
showWaitAlert("Updating Employee information - Please Wait")
AGS(object, "jsreturn")
//}
Any recommendations?
Thanks,
Darryl
You are not authorized to post a reply.