Email based on UserFile.EmailAddress

When sending the order acknowledgement using the APR routing process, an email gets sent to the customer based on the routing but we would like it also sent to the user who is currently logged into that session that manually sent the acknowledgement through the routing process using their UserFile.EmailAddress.

@cchang If you add a field to Orderhed for the current user’s email and populate it on opening the order then add that field to the Order Ack RDD so it will be a field available in the routing to use in the template.

Does selecting the table UserFile in the APR and checkingthe EmailAddress field auto email to the current user logged in when selecting the report style?

image

1 Like

@cchang Given the table is UserFile and the field is EmailAddress It seems reasonable that would work.

I tried that and it seems to take the UserFile from the user that created the PO and not the current logged in user. It doesn’t seem to work as expected from the current logged in user.

It’s my understanding that the APR engine works off of the data in the report data definition.

Is that true @gpayne ?

And if it is true, how is the UserFile table being joined to your report data definition @cchang ?

I believe it is the standard PO RDD. How would we add the UserFile to the current user and not what is in the RDD or if this needs to be done through custom code.

I think it might have to be done using custom code to some degree, but I could be totally wrong.

If code is the answer, I would look for posts on here about people passing in values as parameters to reports that use some type of RDD.

Maybe something like this:

Passing CallContextData from RDD Form to SSRS - ERP 10 - Epicor User Help Forum (epiusers.help)

Would be worth/important to understand the implications of using CallContextData and the like and whether that will give you bad results or not.

1 Like

Sorry, I glossed over the current user.

This thread started on Oder Ack. If this is now POForm that is custom as UserFile is not in the stock RDD at least not in my version. There is calculated buyer email and calculated vendor email.

I do have an automation PO field that I set on POHeader that is set when the PO is made that I use as the To email in APR.

If you wanted current user you could add a field to POHeader that was set with current user on wherever they are printing from or just post processing on GetByID anytime the PO was opened.

Add a UD field?

It is the same request for APR to email the current logged in user. Trying to avoid having to create a UD field to pass the information.

Yes

Why do you not want to add a field? It is the simplest way to get data around in Epicor. Once it is in the data they do all of the work.

It’s definitely a viable way to do this.

If it’s going to be done on the regular why not.

But there is always SysTag.

I’d use the “secret” type. I use them for my project tags.
A secret tag is one with a username that does not exist.

2 Likes

Great idea Kevin, the hard part would be for @cchang to create a tag to print the report and then later delete the tag upon leaving the form. I suppose you could write a BPM to delete the tag after the print job.

Either way, @cchang would have to definitely put some thought into how to create and clean up the tag given their business objective. If multiple users went to send the PO which data tag would it select if there were multiple and he didn’t clean up the tag.

1 Like

Yeah I hadn’t thought it all the way through. Definitely doable though.

1 Like

For sure, novel idea.