Block New Part Creation per Security Group

Hello,

I am having an issue on this.
I first tried a pre-processing Method Directive (Erp.Part.GetNewPart).
I set the condition on if person was member of security group, then threw an exception.
This works great except it is interfering with KanBan Receipts now.
I did a trace and they both call the same method, which triggered of course.

Is there a way to very specifically block new part creation in Part Maintenance only?

I also had a slight brainstorm and I am starting to experiment with setting the PartNum field to Read-only in a customization of the Part Maintenance screen.

This looks like it could also work except I am not sure how to trigger this on load for only the security group I created.

If someone out there has an easier or better way of doing this, it would bee appreciated.
If not, how can I trigger the read only based on if they are in a specific security group?

Thanks for everyone’s help,
Shawn

Hi Shawn,

Here’s an alternative that might work for you. Create a new Menu Item for the Part Maintenance program but check the “Read Only” flag.

Because it’s a menu item, you can assign a security ID with the security groups for those who need only Read access.

Mark W.

That won’t work because they want to be able to edit a part, just not add any new parts.
I thought about creating a 2nd menu item and assigning the group to it but wasn’t sure what would happen if they were in another part of Epicor and did the Right-Click -> Part Entry. Would it open the menu they had access to or would it just not work?
I will give it a shot today and see what the answer to that is.

My thoughts are that there should be some specific info in the method that lets us know it’s a kanban (if there’s a job number passed to that method for kanban you could use that to distinguish).

Other than that, your idea of read only for the part text box seems legit. Essentially, on load, using adapters we get the sec group of the current user, then act accordingly.

I’m in a scissor lift 40 feet in the air so I’ll have to get back to you if you need more info

Any help you can give would definitely be appreciated, when you get a chance. I am still new and don’t have enough knowledge to do it yet. But I am getting closer with every answered question!!!

Thanks,
Shawn

You can look at CallContextClient to determine if the request is coming from PartEntry or Not. If Not from PartEntry let it through

3 Likes

Jose always one upping me with easier solutions…smh

1 Like

Process security on update part?

1 Like

But you won’t find @josecgomez in s scissor-lift - he only does software…

1 Like

@josecgomez has enough dangerous things beneath the age of one running around… he doesn’t NEED a scissors lift…

3 Likes

Jose,

You are a genius!

In my previous Pre-Processing Method Directive attempt (Erp.Part.GetNewPart):

I wasn’t sure what to put in which fields so I created an Information message and listed all the fields for CallContextClient in it.
Then I ran it through both part creation and KanBan Receipts.
The Parts creation had assemblyName = Erp.UI.PartEntry
The KanBan assemblyName was empty.
I then added an ‘AND’ statement to the condition to filter assembly name is equal to “Erp.UI.PartEntry”.
Tested and it looks like it is working!

I wanted to explain how I found it for both mine and other people’s future reference.

Again, I appreciate you taking time out to help me.

Thanks,
Shawn

3 Likes

I’ll have you know I’ve installed many a router on a scissor-lift in the giant customer’s warehouses #MultiTalented LoL

2 Likes