I’m assuming the answer is no but thought I’d see if anyone knows for certain.
I’ve added a UD field to JobHead that I was hoping could be copied over using templates. Is there any possible way to have jobs made from templates carry over the UD field value from the template when creating a job from it?
I’m up for either easy or a hacky way if someone can point me in the right direction.
Well, yes and no. There is a command that maps UD fields from one table to another during GetDetails. The name changes slightly across different versions but in 10.1.600 it’s called:
Unfortunately, there isn’t a map from JobHead to any other table. Maybe there’s a way to add a map but I have not tried to do so. But certainly, you could do a Method Directive on GetDetails and do the mapping yourself.
I did something similar between Quote and Order detail. I used a DD to fill the fields on add.
I considered both data directive and method directive but am trying to figure out how to link the job to the template it was created from.
To give a little more detail into what I’m trying to accomplish, on maintenance jobs that are being created by the system, depending on which template it is created from, I want it to appear on different dashboards (we have one for our maintenance department and one for quality). Quality tends to handle calibrations, while most other maintenance jobs are handled by the maintenance department. It is completely possible that a piece of equipment could have a job for one or the other, or even a job for each. I’m trying to determine which dashboard to place it on, based on which template it came from. I had hoped to do this via a UD field and could do this if I knew how to determine which template it came from.
If you have the fields on the Template job it should be very easy to copy them to the new job through a DD. All you would need is the proper logic to isolate the job being created and set the fields.
Is there an easy way to link a job to the template it was created from? I don’t see anything on the actual JobHead that points to the template. Under Data Directive I don’t see anything that would point me towards the template either unless I am overlooking it.
Sorry, but it has been a few years since I have used Maintenance Management. Are you talking about the job you attach to the maintenance schedule? Have you tested the generation of a new job as I thought it copied exact. If yes and it did not copy exact, I would put another UD field on the table and use that field to trigger your DD. Probably just need a boolean and set it to true when you want the fields to copy.
I’m using Maintenance Planning to create the jobs:
However, it is not copying the UD field:
If it’s not copying this field, I don’t think it will copy another UD field that I add for a boolean to copy or not copy the ud field. Therefore, I can’t see that UD field triggering the DD. If I could somehow link back to which job it is being created from, I could easily grab the field and copy it, the problem being how to determine if the job when created came from a template, and then which one it came from.
Ok. I did a customization on the creation of a job in maintenance before, unfortunately I am no longer at that company.
Why not use the Job Check Offs? I bet those would copy over. That is if you are not already using them all.
That very well might work. I wasn’t aware of these fields and if I was, would have assumed they were used for some Epicor functionality. Will try setting them on the template and see if they carry over. Thanks for the help and input and if it works, I’ll post here for posterity.
Nope, they are there for us. You set the labels in Company Configuration and then expose them on the header.
Unfortunately these are not copied over either when a job is created from a template:
That stinks. I would go with a DD then. Trace the transaction and figure out where the template info is to copy to the new job.
DD would work but I still have no way to link a job with which template is coming from. If I could do that, I could set it myself. Tracing won’t work because I’m not creating the job through any process that I am running but instead by the preventative maintenance process.
Still looking for a way to connect a job with the template it is being created from.
Yes, I believe you would have to do a server trace to see what methods are being called for a process.