Solved

Create Action to Preview Email before sending

  • 30 March 2023
  • 2 replies
  • 82 views

Userlevel 1
Badge

Hello,

 

I am working on creating an Action to preview and send an email created from an email template. I have the email template created and now I want to add an action to a page to call the template and show a preview where the user can edit the email if necessary. However, I am not finding anything on this.

 

Any help is appreciated.

Thanks

icon

Best answer by darylbowman 3 April 2023, 17:13

View original

2 replies

Userlevel 1
Badge

@darylbowman 

Thanks!

 

This worked.

Badge +11

This will open a new window with a blank email. I’m not actually sure how to load a template, but you could probably look through the source code to find somewhere where that is done.

public PXAction<ARInvoice> action;

[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "New Email")]
public void Action()
{
var emailGraph = PXGraph.CreateInstance<CREmailActivityMaint>();
emailGraph.Message.Current = new CRSMEmail();

throw new PXRedirectRequiredException(emailGraph, true, "");

}

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved