Skip to main content
Answer

CRSEmail Fields (mailTo, mailCc, mailBcc) Not Populating with Formulas in Report Designer

  • November 12, 2025
  • 10 replies
  • 100 views

Forum|alt.badge.img

Hello Acumatica Support Team,

I'm having trouble getting the email addresses from our customer screen to show up when sending invoices through email templates.

Here's what I'm trying to do:

  • When we send invoices by email, I want to use the email addresses that are set up in the customer screen under "Send & Print"

  • These email addresses should go to the correct fields: To, Cc, or Bcc

Here's what I set up in Report Designer:

For the "To" field:

= IsNull([BillingContact.Email],'')   + IIf([NotificationSource.SetupID] = 'INVOICE' And [NotificationRecipient.AddTo] = 'An', '; ' + [NotificationRecipient.Email], '')

For the "Cc" field:

=IIf(
    [NotificationSource.SetupID] = 'INVOICE' And [NotificationRecipient.AddTo] = 'Cc',
    [NotificationRecipient.Email] + '; ',
    ''
)

For the "Bcc" field:

=IIf(
    [NotificationSource.SetupID] = 'INVOICE' And [NotificationRecipient.AddTo] = 'Bcc',
    [NotificationRecipient.Email] + '; ',
    ''
)

The problem:

  • Only the main customer email address works

  • The additional email addresses from the "Send & Print" section are ignored

  • No error messages - it just doesn't work

  • Simple formulas work, but the more complex ones with conditions don't

What I've tried:

  • Checked that all the data fields contain the correct values

  • Tested simple formulas (they work)

  • Verified the email formats are correct

Could you please help me figure out why these formulas aren't working? Is there something special I need to configure, or is there a better way to set this up?

Thank you for your help!

Best regards,
Pantea

Best answer by lauraj46

Hi ​@PanteaShahrian ,

I created the variable in the collection on the DetailSection of the report, see screenshots below.  In my example I didn’t pull in the actual email addresses.  I was just trying to validate that we can loop through the data and use the resulting variable to populate the email settings.

One issue that you will need to consider is how to avoid duplicate records in your schema.  If a customer has multiple email recipients, then the other sections of your report such as the sales order lines will be duplicated for each recipient.  You will probably want to add another level of grouping so that the line items only appear once.

Hope this helps!

Laura

10 replies

bwhite49
Captain II
Forum|alt.badge.img+10
  • Captain II
  • November 12, 2025

You are sending through the existing email actions (Email action on the invoices and memos screen or through process invoices screen), then you should not need to do any of this. The additional emails should automatically apply as long as you are modifying the appropriate mailing ID.

 

 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • November 12, 2025

Hi ​@bwhite49 ,

thank you for your quick response!

yes, I understand — but in my case, I’m using multiple email templates.
That’s why I don’t send emails through the standard “Email” action.

Instead, I click Print → Send, where a popup appears that allows me to select the desired email template.
The issue is that in this popup, the additional email addresses from the “Send & Print” section do not appear,  only the main customer email address is shown.

Please see the attached screenshots for reference.

Best regards,
Pantea

 


bwhite49
Captain II
Forum|alt.badge.img+10
  • Captain II
  • November 12, 2025

If sending emails from the form/report, then the email info generally comes from the report. You might be able to build some of this logic into the report itself but trying to add the additional mail to contact info will likely cause duplication issues in the report design. 

Outside of the existing actions, those additional contact fields don’t really work from my understanding. Not sure there is a simple solution here. 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • November 12, 2025

@bwhite49 
Thanks for the explanation, i understand what you mean.

Best regards,
Pantea


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • November 12, 2025

Hi ​@PanteaShahrian ,

I agree with the explanation by ​@bwhite49, and I also understand why you would like to include those recipients in the version that is sent interactively using Print-->Send.  

Your idea is really interesting.  I never thought of joining those tables to acheive this functionality.  Keep in mind, however, that there may be multiple email receipients listed in the Send & Print tab.  In that case, your query will return multiple detail records, one for each receipient.  To avoid duplications in your report body, you probably need to add either a subreport (for the email receipient information) or another grouping level in your report.  With that in place you may be able to use variables in the Detail section to concatenate and build the values for the various email fields. 

For the To field, a variable named ToList in the detail section of the report would be something like this:

=$ToList + IsNull([BillingContact.Email],'')   + IIf([NotificationSource.SetupID] = 'INVOICE' And [NotificationRecipient.AddTo] = 'An', '; ' + [NotificationRecipient.Email], '')

And in the expression for the To field in the Mail settings would be something like this:

=IsNull([BillingContact.Email],'') + ';' + IsNull($ToList, '')

I tested in my demo environment with a variable that was populated in the detail section, and it did flow through and appear as expected in the To field when I pressed the Send button from the Print screen.

For debugging purposes, you might also try just displaying the formula expressions in the body of the report.

Hope this helps!

Laura


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • November 13, 2025

Hi ​@lauraj46 ,

Thanks for your explanation! It’s really helpful that you tested it in your environment.

I’m having some trouble with the variables. Whenever I try to create them in the Group Header, I get this error:

"Invalid property value: The type 'System.ComponentModel.Component' is not marked as serializable."

Could you let me know where the variables should be created? I’m a bit lost.

Your idea to use the variables in the Detail section sounds good, but I’m not sure exactly where to place them. A screenshot of your setup would be very helpful.

Thanks again for your help!

Best regards,
Pantea


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • Answer
  • November 13, 2025

Hi ​@PanteaShahrian ,

I created the variable in the collection on the DetailSection of the report, see screenshots below.  In my example I didn’t pull in the actual email addresses.  I was just trying to validate that we can loop through the data and use the resulting variable to populate the email settings.

One issue that you will need to consider is how to avoid duplicate records in your schema.  If a customer has multiple email recipients, then the other sections of your report such as the sales order lines will be duplicated for each recipient.  You will probably want to add another level of grouping so that the line items only appear once.

Hope this helps!

Laura


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • November 24, 2025

@lauraj46 

Hello,
Thank you very much for your support.

Best regards,
Pantea


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • November 27, 2025

@lauraj46  
 

Hi Laura,
hope you're doing well.

I reviewed your approach for retrieving the recipient email addresses. It looks like I may not have all the necessary tables connected correctly in the report schema — especially since I'm currently not getting access to the email data from the Notification tables and only receive “0” as a result.

Could you please let me know which tables and relations you added to the report schema so that the NotificationSource and NotificationRecipient data (including the email addresses) are available?
Then I can adjust my setup accordingly.

Thank you!

 

 


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • November 30, 2025

Hi ​@PanteaShahrian ,

The testing that I did was only related to building the expression for the email address fields - not specific to the Send and Print tab on the customer screen.  I haven’t worked with those specific tables, but did some investigation.  It looks like you may be able to join the DACs something like this:

BAccount.NoteID = NotificationSource.RefNoteID
NotificationSource.SourceID = NotificationRecipient.SourceID 
NotificationRecipient.ContactID = Contact.ContactID

I would recommend that you identify or create a sample recipient in your instance and use a Generic Inquiry to examine and validate the relationships in your specific data.  You will probably need one or more additional filters to select the recipients that are related to the specific report that you are sending.

Hope this helps!

Laura