I have successfully clocked a user in using Erp.Bo.EmpBasicSvc.ClockIn and I can see in the LaborHed table ClockIn generates a new entry with a LaborHedSeq value. My question is how do I get the newly created LaborHedSeq using the API.
When I Clock a user in all I get back from the API when I call Erp.BO.EmpBasicSvc.ClockIn is the date the clock in happend. I can call CheckClockInStatus and get more data but I donât see a LaborHedSeq value
Ah so you should be able just query for Active labor heads by your emp. You cant have more than 1 active header per person (I wouldnt expect, verify that)
With the following code in JavaScript I get an error message: âSorry! Something went wrongâ Do you see anything I might have done wrong? All the {{value}} I used to replace the real values so I could post the code hereâŚ
var myHeaders = new Headers();
myHeaders.append(âX-API-Keyâ, â{{apiKey}}â);
myHeaders.append(âContent-Typeâ, âapplication/jsonâ);
myHeaders.append(âAcceptâ, âapplication/jsonâ);
myHeaders.append(âAuthorizationâ, âBasic {{credentials}}â);
Okay I see if I leave my whereClauses empty I get results back so clearly something wrong with the way Iâm trying to use them. Thanks⌠Iâll have to research how to use the odata styleâŚ
I got it working, I had EmpId but in the LaborHed table its EmployeeNum once I changed that the following code works. Thanks for your quick responses this solution got me past my road block.
var myHeaders = new Headers();
myHeaders.append(âX-API-Keyâ, â{{apiKey}}â);
myHeaders.append(âContent-Typeâ, âapplication/jsonâ);
myHeaders.append(âAcceptâ, âapplication/jsonâ);
myHeaders.append(âAuthorizationâ, âBasic {{credentials}}â);