BPM Hard Stop but don't delete input?

I’m trying to create a simple BPM against Customer Contacts to make sure the Role and Title are filled in before saving new or updating contacts.

It does as it should, it pops open the exception box. It prevents saving unless those fields are filled in.

However in the case of the adding a new record, it completely deletes all the user input after I click ok on the popup. I’m hoping it can just stop the saving and then go back to the form so the user can add the missing info. As it is now, if they click save and have a lot of information filled in, the end user would have to re-enter all that info and that’s very bad UX.

Another approach may be making those fields mandatory in the Extended Properties of the table. :man_shrugging:

That is my go to for making fields mandatory over a BPM.

7 Likes

I tried adding the requirement to the Extended Properties.

It behaved the exact same as my BPM, it deletes all the input as if you didn’t even start adding a contact. That’s the Epicor behavior I need to prevent. I can envision my users entering a bunch of info without role and title and then saving and it deleting.

We’ve trained users to save after every field or every couple fields because Epicor is unpredictable when it deletes or adds records during input so they enter data and save often.

Also If anyone from Epicor is listening: the checkbox on Extended Property Maintenance is misnamed IMO. It should be “Required” not “Required when adding” because the stop triggered on an update too.

1 Like

So, you are going to have to trace the transaction to see what method is being called after you click OK. Once you know that, there should be a way to bypass that method from running.

I feel like this is one of those times where @klincecum chimes in and says: Oh here’s a link to a custom function library that I built for just this type of thing… it writes all the field names and values to a textfield and then programmatically re-adds the record with all those values already filled in.

In all seriousness, though, I was hoping it wouldn’t come to that. But if you had to, you could enable a post-processing directive and then add a new record back with all the values saved from the pre-processing in the callContextBpmData and then re-add them in the Post-Processing BPM after you enter the new record. It could work.

2 Likes

Another option could be instead of a hard stop use a BPM form to have the user enter in the Role & Title, then that data can be passed back and saved. This way the entered data doesn’t get lost and the Title & Role fields entered.

2 Likes

Just thought of this, what message format are you using? Is it the error or another one. If it is error, you may want to just change that to a standard message box.

1 Like

That’s a great suggestion! Gives the user the opportunity to fix it instead of the hard stop.

2 Likes

@smason I believe what you’re experiencing here is unique to the Contacts tab within Classic Customer Maintenance. Most of Epicor does not behave this way. Try the same thing with a BPM on Customer.Update and you will see it doesn’t happen on the Customer Detail tab.

It’s probably a bug in the classic UI with the Contacts EpiDataView behavior. It seems to refresh itself automatically if the server rejects the update. If you try the same thing in Kinetic Browser the auto refresh thing does not happen; it behaves as desired.

My users complain about this too. The answer is to just deal with it. Not worth the effort to add crazy Rube Goldberg code when the issue is already fixed in the Browser.

4 Likes

I wondered about that. We still use Classic and I was able to replicate the problem but I thought how odd it seemed… and didn’t recall that ever being an issue with anything else I’ve ever done. Thank you for confirming this suspicion.

1 Like

I used the Extended Properties and set it there.

The users were not exactly happy with the behavior but will deal with it.

Thank you to everyone that commented.

1 Like