Adding a new data source/table to bpm

I am trying to remake a process from one bpm to another, but there are some fields that are not in any of the tables in the second BPM. I am looking to add ds.JobHead to a job wizard bpm, but I have no idea how to.

The job entry bpm table
image

The job wizard bpm table

I thought the “Invoke BO Method” caller would be the solution to this, but I can’t actually select the parameter “ds”

@Taylor_L , please explain what you are trying to do. You might be falling into the XY Problem (XY Problem). If you let us know what you are doing, we can provide better guidance.

2 Likes

Ah my bad, I should have thought of that.

We have one JobEntry.Update BPM that has a directive that is setting a custom field “Date02” to be todays date when the release button is clicked on jobentry, so a report that we run shows when a job is released. This does not happen when a job is created in jobwizard, so I am trying to make a bpm in jobwizard that does the same thing. JobEntry uses the table ds.JobHead, which has date02 and number03.

There is already a BPM called OrderJobWiz.CreateJobs, and I am trying to add a directive that will also set date02 to be todays date when the job is created in jobwizard. The problem is that OrderJobWiz.CreateJobs does not have the table ds.JobHead available, so I am trying to figure out how to add that to the directive.

Here is the JobEntry BPM with the first condition that checks to see if the released button was checked off.

Action 0 (Sets the date02 field to be todays date)

Action 1 (Sets the exact time the job was released)

OrderJobWiz not having the JobHead table

After some digging, I thought that “InvokeBO Method” would be able to add the table to the directive, but that does not seem to work. Trying to hit ok after configuring a parameter does not work at all.

All that to say, is there a way to add a table that is not currently in a directive, to that directive?

I think the best way to handle this would be through a Function. Have you created any functions yet?

Does the Job get released through the Order Job Wizard? If it does, the JobEntry.Update should already be getting called. Have you traced the transaction to see what methods are called?

You might just need to update the logic of your existing BPM. Throw a message box in the BPM and when you use the order job wizard, it should pop up if the Update method is called.

2 Likes

I have not made any functions at all. I just started playing around a bit in functions, and I am not entirely sure on what to do with them. Trying to do a set field setter brings up a warning that I do not have any tables even though I have one in the table section of the reference.

The job is released through order job wizard, but I am not seeing JobUpdate anywhere. Order Job Wizard only has 3 methods in it, ignoring the release date method that I just made. They all run custom code, which looks like it might help now that I am looking at it further.

All methods in OrderJobWiz.

Example of code in a method. I see that it creates a variable ttJobHead in line 3 and it references Db.JobHead. Does that seem like it could be useful or no?

I will go ahead and add a message to the original bpm and see what happens.
EDIT: Adding message to the original BPM and then going to order job wizard did not have a message pop up.

1 Like

You have to give the “Library” Read or Read / Write Access on the front page of function designer.
If you want to write, you will also have to click the checkbox on the table itself in the references after setting read / write.

1 Like

This would be in the JobEntry service - JobEntry.Update

I don’t know if we’re certain that this method is called in the background when CreateJobs is called - but you can test it by setting your UD field when RowMod == “A” … or “on the Added Row” if you’re using widgets
or whenever your UD field is empty? Except that would pick up any pre-existing jobs…

Here is what I put in, what am I missing?

@jwphillips
I am not entirely sure what you mean. I am fairly certain that the method is being called when the job is released, since date02 has data in it when I run a baq after releasing the job in job entry, but there is no data in date02 when the job is created/released in job wizard.

@josecgomez , @hmwillett , @klincecum , @Banderson , @Mark_Wonsil , @MikeGross , @utaylor , @Ernie , @hkeric.wci , @gpayne , or anyone else.

Do you know of a good post to reference to learn about how Epicor works? Only one I can think of is (Epicor Backend 101), but feels like I am plugging myself.

I guess i’m not 100% sure what you are looking for , I would say the Guides are pretty good

App Guide
Customization Guide
Programmers Guide

Those are all in the App Help

As far as architecturally how Epicor works they have a really good break down in the Epicor ERP Architecture Guide in the Epicor Help System (Non Cloud) classic Help

6 Likes

I see that now - I got mixed up with directives having the same name on different methods in your screenshots.

Have you tried to create a directive for new jobs on the JobEntry.Update method? It’ll be almost identical, but your condition will evaluate for a new Job, instead of changed values

Thanks, I forgot about those!

If you’re just adding a date when a job is created/updated… I think I would just do a data directive, and that will cover all of the scenarios. Generally you don’t want anything complicated in data directives because it can slow things down, but what you’re trying to do is really simple.

3 Likes

@Taylor_L , I recommend reading up on how Epicor works as it seems like you might be new to BPMs and Functions (correct me if I am wrong). Or if you have specific questions about Epicor, we will be more than happy to answer your questions.

I am not trying to not answer your questions, I am concerned that we are not talking about the same things. As an example, you say that OrderJobWiz has 3 methods. Those are BPMs that were created by someone. OrderJobWiz actually has 8 methods.
image

There are no dumb questions on this site. I know because I have asked a ton! We want to help get you to a solution, I just want to level set what your knowledge is.

4 Likes

I am absolutely new to BPMs and functions, so I will go ahead and read some more about this! I appreciate everyone’s help here!

1 Like

Feel free to ask any questions, big or small, if you need any help!!

1 Like

What is the meaning of life?

42

4 Likes

Technically, that’s the answer to “Life, the Universe and Everything”, but I’ll allow it.

Now let’s see who can answer this one correctly…

What is best in life? :rofl:

2 Likes