Adding Employee via HR11 AGS Call

 1 Replies
 0 Subscribed to this topic
 68 Subscribed to this forum
Sort:
Author
Messages
Carl Duffy II
New Member
Posts: 1
New Member
We are using lawson-httpclient.jar in a Java project to login and then make AGS calls to Lawson.  

Basic java code:
  LawsonHttpClient lhc = new LawsonHttpClient();
  lhc.login(sSSOURL, sUserName, sPwd);
  ResponseObject response = null;
  response = lhc.executePostMethod(sTransURL, pTransXML, "text/xml");
  return response.getResponseBodyAsString();

We have been successful with many different calls, but when we attempt to add an employee using a HR11 call we get the below return instead of a success message and the employee isn't added (this is just the end of the XML returned I can provide it all if helpful).

< Request > MANUALCFKEY < /Request >
<  Screen  >  PR13.3 /Screen  > 
<  FORMTYPE  >  window <  /FORMTYPE  > 
<  PassXlt  >  I <  /PassXlt  > 
<  DspXlt  >  A <  /DspXlt  > 
<  Message  >  <  /Message  > 
<  MsgNbr  >  000 <  /MsgNbr  > 
<  StatusNbr  >  001 <  /StatusNbr  > 
<  FldNbr  >  FC <  /FldNbr  > 

I know this is the transfer to the PR13.3 to add the tax deductions and this is something we need it to do, but I can't figure out how to move forward.  Has anyone had any luck performing an HR11 AGS call to add an employee and create the tax deductions?

JimK
Basic Member
Posts: 10
Basic Member
Had this exact same issue - just figured out how to get around id.

Had to include 'XMIT-HREMP-BLOCK' to bypass messages.

Also had to include 'PT-FROM-PR134' to assumedly make the call think it was coming from the PR system.

_txnFields += "&XMIT-HREMP-BLOCK=1000000000";
_txnFields += "&PT-FROM-PR134=1";

Figured this out by creating an 'Upload Query' from MS Add-Ins, then dissected AGS call via ‘View the last Upload Query sent’ to determine which fields it was passing that I was not.

Is working perfectly now.