In Sage X3, we recently had a requirement to configure an email to be triggered to send the Payment Voucher report as an attachment on posting the Payment entry to the respective supplier against whom the Payment entry has been created.
So let’s see how we can create and configure an email.
Step 1: Deploy the report.
Step 2: Create the report code Ex: ZIAPPAYVOCHR1 for the report and set the destination as Email and tick the Mandatory check box.
New Stuff: Multiple grid lines selection & operation in Sage X3

Step 3: Now we need to write a script to get the mail address of each supplier and to do so we will write a script on the AVANTBOUT action of SPEPAY to fetch the supplier’s mail and store it in a global variable.
Step 4: To print the report we will write a script on the AVANTBOUT action of SPEPAY (As we are not sending mail while printing the report, it will trigger on posting the entry So we have to add code to print the report).
Now let’s create a workflow for this report.
Step 5: To create a workflow (Ex: ZPAYVOCHR1) go to Setup->Workflow->Workflow Rules.
Set the event code to ARP and in the Conditions tab, select Type as Header and in the conditions, [F:ARP]RPTCOD=”Report code”
Ex: [F:ARP]RPTCOD=”ZIAPPAYVOCHR1”

Step 6: Now in the Recipient put the Global variable that contains the mail id of the supplier. Here in our case the Global variable was “ZSUPPMAIL1“.

Now, once a Payment entry is Posted a mail will be triggered that will send the report to all the suppliers in the Payment. In this way we can trigger an email to all the suppliers in Payment entry.
About Us
Greytrix – a globally recognized and one of the oldest Sage Development Partners is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development, and implementation competence.
Greytrix has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3, Sage Intacct, Sage 100, Sage 500, and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users, and Sage PSG worldwide. Greytrix helps in the migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes addons like Greytrix Business Manager, Sage CRM Project Manager, Sage CRM Resource Planner, Sage CRM Contract Manager, Sage CRM Event Manager, Sage CRM Budget Planner, Gmail Integration, Sage CRM Mobile Service Signature, Sage CRM CTI Framework.
Greytrix is a recognized Sage Champion Partner for GUMU™ Sage X3 – Sage CRM integration listed on Sage Marketplace and Sage CRM – Sage Intacct integration listed on Sage Intacct Marketplace. The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for the processing and execution of application programs at the click of a button.
For more information on our integration solutions, please contact us at sage@greytrix.com. We will be glad to assist you.