How do I create a restriction on adding a 'new operation' in Job entry, Assemblies

Hello everyone,

I’m currently working on a customization in Epicor’s Job Entry application, and I could use some guidance. My goal is to create a restriction on the “New Operation” feature so that once materials have been issued to a job, users won’t be able to add any new operations.
Does anyone know how to accomplish this? Any insights or step-by-step advice would be greatly appreciated!

Thank you in advance for your help!

@Muntaha_Bajwa Welcome. First thing is to do a trace and see the business object that are being called. Then pre processing on EG AddNewOpertion have a bpm that does count of JobMtl records with issued quantity > 0. If any exist then throw an exception with a nice message that stops the add operation.

3 Likes

Hi! I’m just getting started with this, so I could use some guidance. Do I need to create a Custom Code widget to count JobMtl records where the issued quantity is greater than zero? Thanks for the help!

Something like this should work. All widgets.

image


2 Likes

Hey, I’m sorry for being such a noob in this, I’m trying to set up a method directive, but I don’t see the ‘Set Argument/Variable’ widget in my Method Directive Maintenance. Is there something I need to enable for it to show up?
Also, once I have it, how should I define variables or arguments for this directive?

I think you need the bpm cookbook and the ice tools user guides from epicweb to follow some examples that will get you started.

The Set argument should be in the setters at the bottom.

Can you give me the link for the BPM cookbook, I couldn’t find it Thankyou so much!

C# Programming Guide
https://epicweb.epicor.com/doc/Docs/Kinetic_CProgrammingGuide_2024.2.pdf

BPM Cookbook
https://epicweb.epicor.com/doc/Docs/Kinetic_BPMCookBook_2024.1.pdf

3 Likes

Hey everyone!
I’m working on a BPM to restrict adding new operations in the Job Entry screen when materials have already been issued to a job. I set up a condition to check if any JobMtl records have an IssuedQty greater than 0, but it’s not working as expected. Has anyone else encountered this or had any ideas on what I might be missing?

Compare your bpm to what I posted. You are checking for any jobs have had mtl issued, not this job only.

Hi, I’ve designed this, but it’s still not working as expected. Could you guide me on what I might be doing wrong?
Also after I save it I am getting this error,
There is at least one compilation error.
InsertNewJobOper.Pre.RestrictingNewOp.cs(83,28): error CS0019: Operator ‘==’ cannot be applied to operands of type ‘string’ and ‘bool’


I don’t see anything in the screen shots. be sure to check syntax before you check ok on the expression. If you upload the bpm I will load it and see if I see anything.

Yes, I’ve checked the syntax everything seemed fine.
export.bpm (41.2 KB)

Your bpm would not load, so there are issues with it. I did a bpm like yourr on insert and it did not fire, so I did a trace and the method I saw was GetnewJobOper, so I made this one on GetNewJobOper.

The attached bpm stops the add in job entry.
stop oper add.bpm (53.2 KB)

2 Likes

Thank you so much! it’s working fine

1 Like