Table / Field name needed for a bpm

Epicor 9.05.701

I’m trying to write a bpm to default the field “Finite Capacity” when you click Actions/Schedule/Job Scheduling from Job entry.

Does anyone know the correct Method Code and Business Object?

Thanks in advance.

So, it looks like the answer sits behind customisations and then Form Event Wizard…ive done the following:

and then go back to the script editor, but what do i write in the script to say make the scheduleengine.finite field default to TRUE?:

Can you use a form customization?
Here is an example of setting Finite when the form loads.

Thank you Bruce,
Silly Q, but do i need to type in the same as your rows 60 to 79?

as the below didn’t work, so i guess i’m missing a step.

private void ScheduleForm_Load(object sender, EventArgs args)
{
// Add Event Handler Code
EpiDataView edvScheduleEngine = ((EpiDataView) (this.oTrans.EpiDataViews[“ScheduleEngine”]));
edvScheduleEngine.dataView[0].BeginEdit();
edvScheduleEngine.dataView[0] [“Finite”] = true;
edvScheduleEngine.dataView[0].EndEdit();
oTrans.Update();
}
}

private void edvScheduleEngine_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
(
// ** Argument Properties and Uses **
// view.dataView[args.Row][“FieldName”]
// args.Row, args.Column, args.Sender, args.NotifyType
// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView
if ((args.NotifyType == EpiTransaction.NotifyType.AddRow))
(
if ((args.Row > -1))
(
)

the above entered onto Form Event Wizard using event type as “LOAD”

I use the Wizards to make the shell (and supporting code) , then just edit the body of the function

Mark - I don’t see the point of Bruce’s 2nd function …_EpiViewNotification(…)

Try removing that. And it definitely should not be inside the Load function

EDIT: The text you posted doesn’t even have properly matched parenthesis for the EpiViewNotification function

Hi Calvin,
I’ve never written C# before, so any help would be much appreciated.

private void ScheduleForm_Load(object sender, EventArgs args)

{
// Add Event Handler Code
EpiDataView edvScheduleEngine = ((EpiDataView) (this.oTrans.EpiDataViews[“ScheduleEngine”]));
edvScheduleEngine.dataView[0].BeginEdit();
edvScheduleEngine.dataView[0] [“Finite”] = true;
edvScheduleEngine.dataView[0].EndEdit();
oTrans.Update();
}
}

Yes, two separate functions…

I use the wizards too…

  • to add the notification… lazy way I sometimes reference the dataview… no other purpose
  • to add the form load… where I then set the field(s) in that dataview

So is the second function required for the first to work?

Edit: I also now see the the first function is inside of another.

I think Bruce needs to confirm that.

Just to confirm the aim is to:

in Job Entry, when you click Actions and schedule a job, i want the field “finite capacity” to be TRUE everytime, so basically a default.

maybe part of the problem is i am applying the C# syntax to JobEntryForm,…i guess it should be to ScheduleEngineForm but i don’t know how to change that

then the next step is making sure the syntax is correct.

}?

ScheduleEngineForm
Definitely…

And yes, braces are not complete, I added partial screen shot.
So copying characters verbatim will result in some errors…

Maybe try again from scratch
Use the “Form Event” Wizards

  • add EpidataViewNotification
  • add Form Load

Then insert this in the form load function should work?
edvScheduleEngine.dataView[0].BeginEdit();
edvScheduleEngine.dataView[0][“Finite”] = true;
edvScheduleEngine.dataView[0].EndEdit();
oTrans.Update();

Maybe this screen shot is a little better

2 Likes

Most forms allow for customization. Just make sure the Developer mode is enabled before doing whatever launches the form you want to customize.

If the form is not customizable (like BAQ) you’ll see:

As per screenshot, i’m falling over on the first hurdle…i can get the epviewnotification easy…but how did you manage to get the schedule form part?

  1. With Developer Mode OFF, open Job entry, and load any job (or create a new one)
  2. Enable Developer Mode on the main window
  3. Back in the Job Entry form, select Actions -> Schedule - > Job Scheduling

The customization select for JobEntry.ScheduleForm will appear.

Load the Base, then in the Schedule form Right click to access Customization

1 Like

Big thank you to Bruce and Calvin,
thank you both for your patience!..it works

Just out of interest…

supposing, instead of the Action being to default a field, i wanted to:

Automatically open Schedule Job (from actions in Job Entry) when the job is ticked Engineered?..

  1. can this be done via a bpm
  2. or customise the C# as we have above.
  3. if 2) applies, what would the syntax and steps be?

I would try searching for “ProcessCaller.LaunchForm” to begin with.
I’m pretty sure there are existing examples that are close to what you want.

Also, if you don’t already have copies of the customization manuals, I’d download those too.
Some good examples in those too.

DANGER WILL ROBINSON !!!

The examples in the docs often use “fancy quotes” that will cause compilation errors.

For example on page 421 of the Epicor ICE Customization User Guide is the following sample code
(which conveniently is for the ProcessCaller.LaunchForm function Bruce mentioned above)

private static void btnEpiCustom1_Click(System.Object sender, System.EventArgs e)
{
// place event handling code here
LaunchFormOptions lfo = new LaunchFormOptions();
lfo.IsModal = false;
lfo.SuppressFormSearch = true;
lfo.ValueIn = txtEpiCustom1.Text;
ProcessCaller.LaunchForm(FSCallCdForm, “Erp.UI.JobEntry”, lfo);
}

Blowing up the page shows the sample uses fancy quotes:

Copying from the PDF and pasting into the script editor will insert those non-standard quotes.

2 Likes