How to programmatically call the "Create Jobs" button on Order Entry program in Epicor 10?

I just tested and it works great! And you never get any errors on the ‘GetNewJobProd’ method? That’s where sometimes in my code I get errors and end up having to flush IIS and relogin…

Thanks again!

No, should never have to recycle iis when calling any methods

Can you shed some light on the possible values for SchedTypeCode? I’ve seen “jj” and “ja” but can’t seem to dig up an explanation.

It corresponds to the options in the Move Option drop down, you’ll have to run a trace to see what each option is equal to (jj, ja, etc.) This is on the Move Job popup when moving jobs on the job schedule board.

image

1 Like

Hi @knash
I am trying to do the same, could you guide me through this solution?
I am very new to this part of Epicor and have no idea how to do it

I will try and help. What is the business case? What have you tried so for?

Thanks!
I have created a BPM on the PartBin table in-transaction. If the bin corresponds to a specific one, the BPM should create a job for the transacted part & qty.
I haven’t tried much as I haven’t written custom code before now. What I wanted to do was to create a new record in the Job table, call GetNextJobNum, assign the part, qty, and possibly get details, engineer, and release the job.

I didn’t write custom code. I created the job via the BPM calling the BO. Have you run a trace on the manual process? That will tell you the methods you will want to call. The BPM flow should follow the trace. You should be able to create job, fill the new job with information, update the job. I would guess with three or four BPM objects. Depends on where the information is coming from. Here is a screenshot of the BPM we use, it is more intense then what you are looking for. We used the createJob from the HDCase BO. You will need to adjust based on your needs.

Start out small and build on what you are trying to do. I would first create a job. Then add your other data. Post here when you get stuck. It might be better to start a new topic as well.

2 Likes

That’s it!
Using the Data Directive BPM I was trying to use the Invoke External Method, which says “assembly not specified” when I try to work with it, so I thought I needed some custom code.
I just need to find the correct Method
Thank you!

Note that I was able to create a job from an Update method using the QuickJobEntry business object… here is an image of the BPM Widgets (No c# code required):


This basically, “gets” the job, then I set a bunch of the parameters, then call the “QuickJobEntry.ChangeQuickJobPartNum” and “QuickJobEntry.enerateJob” at the end. It does all the work

2 Likes

Hi Tim, after the answer from Ken I tried to do something very similar to your solution. Unluckily the QuickJob tableset has same types as the tableset of inspection (where I have my BPM). This generates a known issue still not fixed by Epicor.

It looks like the UD table solution originally mentioned by @knash is your answer here.

If your inspection BPM just writes all the data you need to create the job to a UD table row, a further BPM on the UD table can pick it up and shouldn’t have the dll conflict. And you get the extra benefit of a record of all auto-created jobs.

1 Like

Where is the job.GetNewJobHead(ds); defined in this example?

Where did you place this code? Did this go on a method directive? If so which one?