BPM - Order Header Salesperson

Hi,
I have created a BPM that warns users that they need to add a salesperson if not entered. If I set the field to be Salesreplist then it forces the user to add a salesperson but for all salespeople not just the first. when i use the Salesrep1 field it does not work. Any clues?

You should make the BPM specific to there just being a SalesRep in the first part of the SalesRepList field. Basically, pull lit apart, check that there is something in the 0 position of the array.

Thanks for your reply John. I am new to BPM so I am not sure where to start in terms of testing the 0 position of the array.

Can you detail what your current BPM is doing?

Upon updating the Order Header of a Sales Order it is trying to ensure a salesperson is added on saving

Can you post how the BPM is set up?

condition as below


Exception

I’ve also used SalesRep in the condition

Try setting your condition where the SalesRepCode1 field is equal to the String.Empty expression.

May work better than using "".

I’m lost here, I tried using Ice.entry(1,SalesRepList,‘~’) to break out the first entry and it was not working.

@josecgomez , @klincecum , @hmwillett , @Banderson , can you not use the entry function anymore?

BPM’s don’t use SQL, so the stored procedure (Ice.Entry) isn’t available. You’ll have to use some C# to split the value.

1 Like

I added this to an Epicor Idea quite awhile ago and it was accepted as In Development Will be available 2025.1

1 Like

Thanks David, I get the message that a salesperson needs adding but after adding I think it is looking at the other salesperson options you can add

And actually, the dataset actually has the individual fields. The BO combines/extracts them to and from the database. Just use SalesRepCode1 for what you are trying to do.

Edit: that’s what you are doing… It should be working.

1 Like

This might be a silly question, but why not use Extended Properties to make SalesRepCode1 or SalesRepList required when adding?

I get the same issue, it looks at the other sales rep fields and when you fill all these in it still doesn’t work

Yeah, I’ve tried this but no change

That’s an option as well.

Are we sure that the field isn’t null?

How is this tested in C#

it’s just the word null.

For giggles, can you make a message box that displays the values on update? So you can see what’s actually there? Usually when BPM’s don’t trigger as you’d expect it’s because something isn’t what you expect in the dataset.

(I can’t really test this in my system because we have a whole bunch of automation related to sales agents and I don’t feel like trying to figure out how to turn it off.)

1 Like