Send document in E-mail (GP)

By using this functionality, you can send documents in e-mail. You can send single document or send multiple documents using lists.

You can send documents in e-mail if the following conditions are met:

 Setup Customer Emails

 –          Open Customer Maintenance window (Cards >> Sales >> Customers)

–          Select one customer, click on Address button and select the Address ID.

–          Click Internet Addresses button.

–          Enter e-mail address for this customer/address combination and click Save. 


 Setup Customer E-mail Options

–          Open Customer Maintenance window (Cards >> Sales >> Customers)

–          Select one customer, click E-mail button.

You can either send documents as attachments or embed documents in the message body. If you send documents as attachments, you can select to send multiple attachments to the customer and set the maximum file size of the document. Mark the documents you want to send in e-mail. You can select a default message ID for each document and select the format that you want to send the document in.

Word templates for Microsoft Dynamics GP must be enabled in the Template Configuration Manager window (Reports >> Template Configuration) before you can send documents as DOCX, PDF, or XPS attachments.


You also can specify message IDs and the document format to use for the customer. A message ID is a predefined message that you can assign to a document that you want to send in e-mail.

Message Setup window

You can customize your messages by adding fields that are associated with a document type. A message can be personalized to address each customer or vendor by name. You could add the due date for a sales invoice in a message or the PO number for a purchase order.


 You can send the following documents: 

Purchase Order Receivables Invoice
Vendor Remittance Receivables Return
Sales Quote Receivables Debit Memo
Sales Order Receivables Credit Memo
Sales Fulfillment Order Receivables Finance Charges
Sales Invoice Receivables Service/Repairs
Sales Return Receivables Warranty

 Table Definitions

SY04904 (Email Card Setup) – This table is populated with values from the “Select Document Options” section from the Customer Email options (or) Vendor Email options window.

SY04905 (Email Card Documents) – This table is populated with values from the “Send Forms as E-mail” section from the Customer Email options (or) Vendor Email options window.

SY04910 (Email Details) – This table contains the details of the emails captured at the various transaction levels in the Email Detail Entry window.

Written By: Shyam Nath (Dynamics GP Team, Cipher Dynamics)

Excel Sheets exported from SSRS can have custom name

We keep wondering to provide custom name to exported excel file from SSRS. SQL Server Reporting Services 2008 R2 has provided an easy way to do so. I will explain you with an example how?

For this example I’ll be starting off from the report created for Payables Consolidations in Dynamics GP.

The Scenario

Payables Transaction Entry has different kind of Document types like Invoice, Payment, Credit Memo, Finance Charge and Misc Charge. When the report gets exported to Excel, each document should get its own sheet name based on document type. So all documents from the invoice category should be located in a sheet called “Invoice”, all payments in a sheet called “Payment”, and so on.

The Report

Starting Position

Let’s first have a quick look what the export to Excel currently looks like, without any modifications to the report.


All records are being exported to just one sheet.  And, by default, the name of the sheet is the name of the report.  (I made a copy of my existing report and called it Payables_Consolidation.rdl.)

In case you want to change the default name of the sheet, it’s possible.  On the report itself, there’s a property called InitialPageName.


Fill in a value and here’s the result in Excel:


Adding The DOCTYPE Group

To be able to get the different document type into different sheets, we need to add a group on Document Type to the tablix in the report.

With the tablix selected, right-click the Details line in the Row Groups pane and select Add Group > Parent Group.  Select DocType as field to group by and activate the Add group header checkbox.


Remove the group column that gets added automatically and move the header cells from the main header to the group header.  Delete the main header row so that you end up with something like this:


Open up the Group Properties by double-clicking the new DocType item in the Row Groups pane.  Select the Page Breaks page and activate the Between each instance of a group checkbox.  Doing this ensures that each group gets its own page in the report, and its own sheet in Excel.


Let’s render the report and export to Excel to have a look at the effect of adding these page breaks.


Indeed, every group has gotten its own worksheet.  However, they’ve also gotten the very original names such as Sheet1, Sheet2 and so on.

Customizing The Names Of The Sheets

On to the final part of the requirements: giving our own customized name to the generated Excel sheets.  This is actually really easy once you know how to do this.

First select the DocType group in the Row Groups pane so that its properties are displayed in the Properties pane.  In the Properties pane, locate the Group > PageName property and specify the following expression:


That’s it, that’s all you need to do!  Don’t believe me?  Here’s what the export to Excel now looks like:



As we’ve seen in this article, it really doesn’t take too much effort to implement a custom name for the worksheets when exporting a report to Excel.

Written By: Sunil Chaudhary (Dynamics GP Team, Cipher Dynamics)