Making buyers only able to purchase for parts they are the buyer for

We are looking to restrict who can buy certain material. MRP needs to run and do it’s things without impact but for purchases outside of MRP we are looking to allow buyers to only buy material that they are the buyer for.

I have been through numerous postings but I seem to be stuck as the buyer info is listed on partplant and my BPMs are focused on the list of part numbers within the part table. I can see that natively all the BPM objects restrict you to the calling BO i.e. part so can’t figure how to include data from partplant.

Thanks in advance


This is actually super simple, if you can use Part Classes.

we are still in the implementation phase so can explore solutions as we review the options within the software. are you saying to use the native buyer by partclass? Not sure that would work for us though on the fact we need to control our ‘value stream’ purchases.

Actually I was wrong. The Buyer setting on a Part Class is used to set the “default buyer” for related parts, when making PO Suggestions. It does not prevent other buyers from placing PO’s for that part.

Back to your original issue …

You can reference other tables in queries in BPMs. Details to follow:


Here’s the BPM (to get you started)

  1. Two variables: ApprovedBuyer and CurrentBuyer
  2. Set Variable/Argument widget to set ApprovedBuyer
  .Where( r =>r.Company == callContextClient.CurrentCompany && r.PartNum == NewPartNum && r.Plant == callContextClient.CurrentPlant)
  .Select( r =>r.BuyerID).DefaultIfEmpty("").FirstOrDefault()
  1. Set Variable/Argument widget to set CurrentBuyer
Db.POHeader.Where( r =>r.Company == callContextClient.CurrentCompany && r.PONum == ttPODetailRow.PONUM)
  .Select( r =>r.BuyerID )
  .DefaultIfEmpty("Not Found").FirstOrDefault()
  1. Condition to see if they are equal.

Thanks Calvin. I will review this tomorrow. Also, I’ve removed an issue on this as well. I only want this to apply from the PO Entry screen so I’ve used the callcontextclient.assemblyname being equal to “Erp.UI.POEntry” as a condition in the BPM. Took me a good while to figure out the C# expression had to be in quotes!


Seeing your BPM though I can see the condition to check the calling screen may not be required as you’re using PO.ChangeDetailPartNum

1 Like

Thanks @ckrusen. That does the job on looking at data within another table. We haven’t decided on how to setup our buyers but I can test different scenarios.

When you say, " We haven’t decided on how to setup our buyers", you mean actually setting up buyers? Or how to set which Buyers is for the Part?

If it’s the first, take your time to understand that in E10 (as well as prior versions) the term “BUYER” represents a group and not an individual.

We originally setup a Buyer for each user that enters a PO. With the Buyer description the same as the users name. For example:

  1. Buyer “CALVIN KRUSEN” was created
  2. user ckrusen was added as an authorized user
  3. authorized user ckrusen was set as the default. (This appears backwards in the form, as you’re actully selecting the default buyer for the user, not the default user for the buyer.)

Then we realized that if a different buyer needed to update an exist PO, they needed to be added as an authorized user. We ended up with a Buyer for each user that does PO’s, and every user that does PO’s as an authorized user for that buyer.

We could have had just one Buyer, with all the purchasing users as authorized for that Buyer.

Sorry if you already knew that. But it’s worth knowing if you are still laying out your system.

1 Like

Thanks again. I’ve seen many posts on this on Epicor’s implementation of buyers so good to know the additional detail.

Hi @ckrusen

I can get the logic to work to check the approved vs current buyer but what do I need to do in the BPM to stop the user from proceeding with saving/creating the PO? I can get an info message to appear but there needs to be a “cease & desist/can’t proceed with this” widget?

Use a “Raise Exception” Widget. It works just like a “Show Message”, but stops the BO method from completing.


Here’s a GIF of it in action:

Note that it clears the Part Number field too


And I’m there. Exception worked.

Thanks again Calvin

Hi Matt,

There are several ways you might want to accomplish this or a combination of all three below…

  1. Assigning a Buyer in Part Class Entry.
  2. Assigning a Buyer to individual parts, and not have them as authorized buyers.
  3. If parts have prefixes, create a BPM.

I did a test using the Part Classes, and was able to place PO’s for parts that I was not an authorized user for the buyer specified by the part class.