Issue with ChangeJobAsmblParent Not Removing Cost from Old Parent Assembly

Hi everyone,

I’m running into a problem with a function I’m converting from a working customization.

Originally, I had a workaround in place because Epicor wasn’t behaving as expected. The workaround involved setting the “Qty/Parent” to 0.0001 to effectively remove the cost from the original parent assembly. I would then change the parent, and set the Qty/Parent back to its original value in the new assembly. It worked fine from the UI customization side.

Now I’m trying to replicate that logic in a “Function Library”, and I’ve been following what tracing showed:

  • JobEntry.ValidateJobNum
  • JobEntry.ValidateJobNumJobType
  • JobEntry.CheckChangeJobAsmblParent
  • JobEntry.ChangeJobAsmblParent
  • JobEntry.Update

While the cost does transfer into the new parent, it never gets removed from the original parent. It feels like I’m missing a step, or maybe there’s something else happening under the hood when doing this via code.

Has anyone else faced this issue when using ChangeJobAsmblParent in a function? If so, how did you resolve it?

I’ve also tried my workaround, but it does not like to do multiple update in the same few seconds and after that the job seems to be corrupted. I get always an error with the function and the form to do any changes

Any insights would be greatly appreciated! :smile:

Thanks in advance