REST LaborSvc DeleteLaborDtl CallFrom parameter

Hello,

I am trying to utilize the Erp.BO.LaborSvc endpoint “DeleteLaborDtl” and am stuck. The request body is as follows:

{
  "LaborHedSeq": 0,
  "LaborDtlSeq": 0,
  "CallFrom": "string"
}

When calling this method providing a valid LaborHedSeq and LaborDtlSeq, I cannot seem to figure out what needs to go in the “CallFrom” parameter, as the method returns the following response:

{
  "returnObj": false,
  "parameters": {
    "vMessage": "Incorrect Call From parameter."
  }
}

If anyone knows what “CallFrom” should be here, I would really appreciate the help.

Backup, what are you trying to do and why?

1 Like

I’d like to have the ability to programmatically reverse a make to stock job, and recalling and deleting a time and expense entry is part of that process.

1 Like

Interesting, what’s the business problem?

I mean, explain the situation, and what you are trying to solve.

I’m sure Kevin will say this as well, you can only do in REST what you can do in the client. We are, afterall, just making the server think we are the client with REST calls.

My recommendation is not to use REST but to create a function that does this and do it all on the server.

Whether you use an Epicor Function or client-side REST, watch what the client does in a trace and copy those actions.

NOTE: Once labor is posted, you cannot recall and delete it. A trace will show you that as well.

1 Like

I’m actually working on an Epicor function to do this, but figuring out each step using REST help. I am aware of the fact that once the labor posts this is not possible.

Unfortunately when enabling trace logging in the desktop client, the act of deleting a Time Detail in the Time and Expense Entry screen does not result in a new entry in the log, so I don’t have an example of the erp’s UI calling that method to see what values are being passed in the parameters for the method.

1 Like

We have a set of Epicor Functions that create, report against, complete, and close jobs when production activity is taking place. This is triggered by a 3rd party piece of software to keep Epicor records in sync with that software.

There are instances where this logic fails due to a number of factors (including Bill of Material changes, part revision changes, and others) and we need to “undo” the job to reverse material transactions.

The way we’ve been "undo"ing these jobs involves 4 steps and when the job count grows, this process becomes cumbersome, and is not always done the same way. I’d like to create a process to ensure this is done the same way every time, while also simplifying the process for the person who’s responsible for the undo.

Interesting. I’ve never seen that. There should be a method call for recalling from Submitted to Entered and another one for updating the dataset with a “D” in the RowMod.

Too bad this is 10.2. In 11 you can sniff the browser. No place for the transaction to hide like the client.

You are correct, there is a method call for recalling, RecallFromApproval that fires when clicking the “Recall” button. However, I see no log entry for the deletion of the record.

We do have an installation of E11 available in another environment, maybe I’ll do this same process there and see what it’s passing for this parameter, then try that in E10.

1 Like

I would guess it’s the .Update method. The dataset would have the RowMod set to “D” for the records to delete.

1 Like

Sadly, Time and Expense Entry has not been Kineticized for 2023.2, so I cannot use devtools to see what API calls are being made for each action on the screen.

1 Like

It has… there are actually now TWO programs… Time Entry and Expense Entry. The UI is vastly different. I have no idea how they work under the hood.

1 Like

I think you would be better off making labor adjustments to “reverse” the process.

1 Like

I ran a trace earlier before I got called away.

That’s what showed up.

1 Like

Thanks for confirming. I’ll try this and report back.

Ok… just trying to explore this path as well. I found an equivalent record in Time Entry but don’t see a “Recall” option. Am I missing it or is this not an option in Kinetic?

I’m gonna be of limited help on this one. We don’t use it like that, so I have to create entries to test, and I’m not 100% sure I know what I’m doing. (like always)

Just wanted to give one last update before I head home for the day. Following some of the trace logs I was able to get using the erp’s UI, I’m calling RecallFromApproval as part of the logic in my function and am not even able to successfully recall the Time Detail record. I’m calling the same method that shows up in the trace log with the same parameters, but a different behavior using the business object directly vs using the erp’s UI.

Long story short, I am unable to even test the Update theory by marking the LaborDtl records’ RowMod field with “D”, because I can’t delete an approved Time Detail record.

1 Like

Yes, this is 2024.1:

Press F12 and watch the network traffic. There are some debugging threads here.

1 Like

Ah, I see. I was too far down looking at the detail view instead of the list view.


Now I just need to find what permission I’m missing because I can’t see the recall button. I am very familiar with debugging in the browser, so I’m not worried about that.