{"id":26832,"date":"2023-07-28T10:35:00","date_gmt":"2023-07-28T10:35:00","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagex3\/?p=26832"},"modified":"2023-07-28T10:35:10","modified_gmt":"2023-07-28T10:35:10","slug":"how-to-trigger-mail-with-payment-voucher-report-attachment-on-posting-the-payment-entry","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2023\/07\/28\/how-to-trigger-mail-with-payment-voucher-report-attachment-on-posting-the-payment-entry\/","title":{"rendered":"How to trigger mail with Payment Voucher report attachment on posting the Payment entry"},"content":{"rendered":"\n<p>In <a href=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\" target=\"_blank\" data-type=\"URL\" data-id=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\" rel=\"noreferrer noopener\">Sage X3<\/a>, 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.<\/p>\n\n\n\n<p>So let\u2019s see how we can create and configure an email.<\/p>\n\n\n\n<p><strong>Step 1: <\/strong>Deploy the report.<\/p>\n\n\n\n<p><strong>Step 2:<\/strong> Create the report code Ex: ZIAPPAYVOCHR1 for the report and set the destination as Email and tick the Mandatory check box.<\/p>\n\n\n\n<p><strong>New Stuff: <\/strong><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2023\/07\/28\/multiple-grid-lines-selection-operation-in-sage-x3\/\" target=\"_blank\" data-type=\"URL\" data-id=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2023\/07\/28\/multiple-grid-lines-selection-operation-in-sage-x3\/\" rel=\"noreferrer noopener\">Multiple grid lines selection &amp; operation in Sage X3<\/a><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/07\/Fig-1-Report-Dictionary-1024x414.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/07\/Fig-1-Report-Dictionary-1024x414.png\" alt=\"Fig 1: Report Dictionary\"><\/a><\/center>\n<font size=\"2\"><center>Fig 1: Report Dictionary<\/center><\/font>\n\n\n\n<p><strong>Step 3:<\/strong> 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\u2019s mail and store it in a global variable.<\/p>\n\n\n\n<p><strong>Step 4:<\/strong> 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).<\/p>\n\n\n\n<p>Now let\u2019s create a workflow for this report.<\/p>\n\n\n\n<p><strong>Step 5:<\/strong> To create a workflow (Ex: ZPAYVOCHR1) go to <strong>Setup->Workflow->Workflow Rules<\/strong>.<\/p>\n\n\n\n<p>Set the event code to ARP and in the Conditions tab, select Type as Header and in the conditions, [F:ARP]RPTCOD=\u201dReport code\u201d<\/p>\n\n\n\n<p>Ex: [F:ARP]RPTCOD=\u201d<strong>ZIAPPAYVOCHR1<\/strong>\u201d<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/07\/Fig-2-Workflow-Rules-1024x443.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/07\/Fig-2-Workflow-Rules-1024x443.png\" alt=\"Fig 2: Workflow Rules\"><\/a><\/center>\n<font size=\"2\"><center>Fig 2: Workflow Rules<\/center><\/font>\n\n\n\n<p><strong>Step 6: <\/strong>Now in the Recipient put the Global variable that contains the mail id of the supplier. Here in our case the Global variable was \u201c<strong>ZSUPPMAIL1<\/strong>\u201c.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/07\/Fig-3-Recipient.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2023\/07\/Fig-3-Recipient.png\" alt=\"Fig 3: Recipientp\"><\/a><\/center>\n<font size=\"2\"><center>Fig 3: Recipient<\/center><\/font>\n\n\n\n<p>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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>About Us<\/strong><\/h2>\n\n\n\n<p>Greytrix \u2013 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.<\/p>\n\n\n\n<p id=\"block-28013e99-0882-44c6-b705-7b16c85053b2\">Greytrix&nbsp;has some unique integration solutions developed for&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-crm\/\">Sage CRM<\/a>&nbsp;with Sage ERPs&nbsp;namely&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/\">Sage X3<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-intacct\/\">Sage Intacct<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-100-erp\/\">Sage 100<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-500-erp\/\">Sage 500<\/a>,&nbsp;and&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-300-erp\/\">Sage 300<\/a>. We also offer best-in-class&nbsp;Sage ERP&nbsp;and&nbsp;Sage CRM&nbsp;customization and development services&nbsp;to&nbsp;Business&nbsp;Partners,&nbsp;End&nbsp;Users, and Sage PSG worldwide. Greytrix&nbsp;helps in&nbsp;the migration of Sage CRM from&nbsp;Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes&nbsp;addons like&nbsp;&nbsp;Greytrix Business Manager,&nbsp;Sage CRM Project Manager,&nbsp;Sage CRM Resource Planner,&nbsp;Sage CRM Contract Manager,&nbsp;Sage CRM Event Manager,&nbsp;Sage CRM Budget Planner,&nbsp;Gmail Integration,&nbsp;Sage CRM Mobile Service Signature,&nbsp;Sage CRM CTI Framework.<\/p>\n\n\n\n<p id=\"block-4bc42a09-fb13-4598-8137-ce5f7b91ce28\">Greytrix is a recognized&nbsp;Sage Champion Partner&nbsp;for GUMU&#x2122; Sage X3 \u2013 Sage CRM integration listed on&nbsp;<a href=\"https:\/\/www.sage.com\/marketplace\/asb_ListingDetail?listingId=a1h24000007PC3aAAG\" target=\"_blank\" rel=\"noreferrer noopener\">Sage Marketplace<\/a>&nbsp;and Sage CRM \u2013 Sage Intacct integration listed on&nbsp;<a href=\"https:\/\/marketplace.intacct.com\/MPListing?lid=a2D0H000007kiHyUAI\" target=\"_blank\" rel=\"noreferrer noopener\">Sage Intacct Marketplace<\/a>. The&nbsp;<a href=\"https:\/\/www.greytrix.com\/gumu\/\" target=\"_blank\" rel=\"noreferrer noopener\">GUMU&#x2122; Cloud framework<\/a>&nbsp;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.<\/p>\n\n\n\n<p id=\"block-76376301-1c3e-4250-8a09-727595a606f0\">For more information on our integration solutions, please contact us at&nbsp;<a href=\"mailto:sage@greytrix.com\">sage@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u2019s see how we can create and configure an email. Step 1: Deploy\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2023\/07\/28\/how-to-trigger-mail-with-payment-voucher-report-attachment-on-posting-the-payment-entry\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,13],"tags":[3494,1448,2802,3495,2432],"class_list":["post-26832","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","category-integration","tag-mail-to-supplier","tag-payment","tag-payment-receipt-entry","tag-trigger","tag-workflow"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/26832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=26832"}],"version-history":[{"count":6,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/26832\/revisions"}],"predecessor-version":[{"id":26855,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/26832\/revisions\/26855"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=26832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=26832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=26832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}