Tracing a mystery BPM

,

What about Data Directives, can you show us any Data Directives on the Customer or CustCnt tables?
Also, do you have any Method Directives on the CustCnt BO?
Seems like whatever the condition is, it’s dependent on some other value.

I have seen something similar before, in that instance there was a BPM to send an email, we were using a data field for the email address, but Epicor complained it wasn’t a proper email address, so I had to add one into the CC field.

What do the CorrectAddress and AtMail BPMs do?

Nancy - I tried disabling all BPM's via the web.config setting (very cool, by the way!), and still got the error message! I verified that other BPM's didn't fire (was concerned I'd need to recycle IIS or somehow reset things, but it didn't seem required). This same customer behavior is in our test db, so that's where I'm playing...

Rick - We have a few Data Directives for Customer, and none for CustCnt. CL-#### is only change logs, and the CatReqAutoPrint and CatRequest are for our mailings, which set fields via widgets, and do not have alerts.

CustCnt has 2 method directives. PrimaryCheckbox sets fields only, and currently isn’t enabled. LimitAMZNContacts shows up blank on the preview screen, and also isn’t enabled. That one looks for a CustID=### condition, and sets the pageSize argument.

image

Mark - CorrectAddress runs the mailing address through Avalara’s address verification via C# code, and doesn’t seem to touch the email field. AtMail looks for a condition that the ttCustomer.EmailAddress has an @mail or @usa domain name, and then sends an email to a manager.

Andy - The Customers email is @gmail.com, and I can’t find anything that would cause that to bomb out. Other customers let me delete their emails. I’ve tried to replicate the scenario, and can’t figure it out.

Thanks for the suggestions, everyone!

hi

what is in the send email piece of code, this is where the problem might be, if you are using the field to pick it, you may need to put a dummy in the correct format in the bcc or cc box

Andy - It’s a basic outgoing email widget to two people… I would think the conditional logic of matching “@mail” or “@use” would be needed to get to the Send Email widget. Thanks for the ideas!

image

image

image

Hi,

This looks like the same issue, just try putting a generic email in the CC box, like bill@hotmail.com, that fixed ours

Andy

Andy - The AtMail BPM (AFAIK) works fine, but I was trying to figure out why Epicor is preventing this one customer account from deleting the email address (everyone else is fine, and can exist without an email entered…).

I told the user to enter “NONE” in the CustCnt.EmailAddress field, which let her move on, but, like a dog with a fresh bone, I wanted to see if I could figure out why it was bombing out… When I disabled BPM’s (including AtMail), I still received the error.

Shot in the dark here, but do you happen to have a custom UI that’s calling code there?

Aaron - I’m not exactly sure, but I did open Customer Entry in developer mode > customize and took a look at the script tab. I searched for “email”, but the term didn’t come up in the C# code. Is that what you mean? Thanks!

That’s the area I was referring to, yes, but you may not get any hits by searching for the word “email”.
It all depends on what the code is doing if there’s even any in there.

I understand what you are saying, its just the same issue I had, and this was the fix, worth a try

I think I figured this out!
I was reviewing again as I couldn’t get it out of my head, it didn’t make sense, and I realized that you are running the same version as one of my clients and they let me mess around in their test DB, so I thought it might be a bug I could replicate, that didn’t work.
I was looking at @Chris_Conn post earlier with the Customer Contact screen and I realized I had seen this error before.
It’s 'Commerce Connect. If Web User (SFUser) is enabled for a contact you MUST provide an email address:
image

10 Likes

Nice @Rick_Bird!

Rick for the win!!! Yeah! :slight_smile: That was it!

Hooray for smart developers with a lot of random knowledge gained by painful experience instead of thorough error details, he he he. :wink:

1 Like

Just to follow-up on what @Chris_Conn posted earlier in the thread. Here is the way to track this down using a decompile
Find the library referenced in the message and open using de-comp (Erp.Services.BO.CustCnt.dll)

image

Find the method in the code that was referenced (CustCntBeforeUpdate). You can typically then review the statements using field (EmailAddress) as a search

private void CustCntBeforeUpdate()      

if (this.ttCustCnt.get_SFUser() && string.IsNullOrEmpty(this.ttCustCnt.get_EMailAddress()))
   ((ContextBoundBase<ErpContext>) this).get_ExceptionManager().AddBLException(Erp.BO.CustCnt.Resources.Strings.AValidEmailAddressIsRequired, "CustCnt", "EmailAddress");
3 Likes

Dan - Thank you for sharing - Good info (which I’m sure will help me troubleshoot in the future).

I didn’t see Erp.Services.BO.CustCnt.dll in the Client folder, but did see Erp.Contracts.BO.CustCnt.dll and Erp.Adapters.CustCnt.dll. Is it on the server somewhere?

If there’s a reference to read, I’ll go seek that out. I’m not a programmer, so this is new to me. I’m hoping to get a lot out of Insights again this year.

Also - What’s the difference between Adapters, Contracts, and Services?

Thanks for your help, everyone! I’m learning a ton.

Checkout this

3 Likes

The Erp.Services.BO.CustCnt.dll would be on the server in the folder that the application was setup in. You can find the application folder by looking in the Epicor Admin Console and under server configuration

1 Like

Thanks Dan - Found it, and now have another tool in the bag of tricks.

Jose - Thanks. That’s a fantastic thread. Some is a bit over my head at the moment, but I’ll be reading through Architecture Guide and ICE user guide more thoroughly. Every time a little more sticks!

Side-track - I need to learn service connect to consume & process some files, but if REST is the future, that may need to be prioritized. Time to figure out which Insights courses to attend. See you guys there.