Email Body for a custom report in Business Central - dynamics-business-central

I have created a custom (.RDL) report in SQL Server Report Builder and an AL extension that emails this report as a PDF attachment from an action on a custom page & table in Business Central. This is working fine. My question is about the email body text. At the moment I have hardcoded a few sentences (e.g.) 'Please see attached document etc...' in the codeunit in the extension. Ideally I would like the users to be able to edit the email body text as and when needed in BC without me having to change the extension. Is there a way that an email body can be saved in Business Central for user editing? And can that email body be loaded programmatically by a codeunit prior to sending the email?

It is possible to do what you are asking using.
Business Central does exactly this when e.g. sending Sales Invoices.
You should have a look at the Report Selections table. It has a procedure GetEmailBodyTextForCust which does the swap to the relevant report layout for the email body. It is used in the procedure SendEmailToCustDirectly.
Note that the report layout used for email body must be a Word layout.

Related

How do I make a contact form 7 in wordpress

I want to Make a contact form in wordpress including input fields and some checkboxes , I want the form data to go to my email address.
How do I make one from scratch ?
Go to the wordpress dashboard and click "Contact" on the left hand side.
Click add new.
In this area you have two boxes, form and mail. Form is what is displayed on your website and mail generates what is sent to you (ie the e-mail address the form will be sent to and the default template of that e-mail).
Directing mail to your e-mail address is very simple - just change the "To" box to your e-mail.
The form box is completed by generating tags using the plugin. For example, to generate a file upload box you click generate tag -> file upload -> and change the options within (required field, etc) and then paste the given code to the form and the mail boxes where it directs you to.
Once this process is finished for all forms click save and copy the generated shortcode to the page you want to include this contact form in.
Hope this answers your question,
Paul
You can find all you need in their documentation.
Contact Form 7 Documentation

send email to email field in specific content type content creation

I'm using Drupal 7. I can't find out how to send mail to email field in specific content type content created. like, someone create content and fill out email field in that content, then site should send email notification to that email field. Is it possible? I've research Rules but with Rules basic function can't do this.
I am sure this can be done using rule, you just need to use the replacement pattern there in rules action, all the fields value are available there like [node:title] for title of the node and [node:body] for the body of the node, similarly something must be avaiable for your email field, you just need to put that replacement string in the "To value" in rules action.
Hope it helps.
if i am right, you want to send an email if new content was created?
I don't have experience with "Rules" but you could build your own custom module for that.
You only need to hook into all events you might need for that.
For example:
hook_insert: Respond to creation of a new node
This requires basic understanding of Drupal Module System.
Complete List of Hooks: http://api.drupal.org/api/drupal/includes!module.inc/group/hooks/7
Module developer's guide: http://drupal.org/developing/modules
Greetings.

Email to node author in Drupal 7

Drupal 7:
I need a module to append a contact form to a node of a specific content type. The form should be configurable and permit to send an email with an attachment to the node author. The form should also have a captcha. The email must not be saved in the database.
Does such module exists or do i need to develop it ?
You should be able to achieve this through the combination of the webform module, CAPTCHA module and a custom module.
Webform defines it's own 'webform' content type, but it also allows you to make other content types webform enabled by visiting 'admin/config/content/webform' and selecting the appropriate content type.
The token module provides node tokens such as nid and title which can be included as a hidden form element, but annoyingly, doesn't include the author as a token.
On the email tab of your webform, it's possible to choose a form component as the email address to send the form results to. I would create a hidden field, leaving the default value blank and then it should be fairly easy to add the node author value to it in a custom module using hook_form_alter (form id can be found by viewing source and looking for the hidden input 'form_id'). You can then use this form component in the email tab to send the results to.
The only thing I can see causing an issue is that there isn't an easy way to stop webform recording the form result in the database - I would imagine this would be achievable in a custom module without too much hassle though.
Yop, there is such a module. It's called Webform. Using Webform you can add a block form under certain node type with predefined fields and let send email directly to the node author.
Download and enable Webform 4.x
Create new from, add desired fields
Under E-mails tab for Address use token [current-page:node:author:mail]
In Form settings tab check Available as block
Configure newly enabled block (show only under certain node type + set restricted pages to the node/*/*)
Do tests
You can find printcreens and more detailed instructions here.

Sitecore Web Forms for Marketers - use current URL within email body

I am trying to build a 'Tell a Friend' form for my Sitecore site using Sitecore's Web Forms for Marketers module and would like to include the URL of the current page within the body of the email. I have set the save action of my form to 'Send Email Message' and was wondering if it would be possible to use some variable to represent the URL of the current page, but can't figure out how to do it.
I noticed that if you link to a page when editing the HTML editor for the email template, the source looks something like this:
Name of page
...so perhaps it is possible to use some similar syntax to get the current context page?
I have also tried setting the save action of my form to 'Tell a Friend' but I can't see how to make this include any email content at all, let alone how to make the email include a link to the current page.
For reference I am using Sitecore 6.5.
I have an idea for this, but its more of a hack. Worth a shot:
Since the Email Editor supports inserting hooks for the dynamic fields (refer to section 4.2.2 of the WFFM User Guide [PDF]), why don't you create a Single-Line Text field on the form, call it "Current Page" and apply a unique CSS class to it (e.g. .current-page)
Using custom CSS, hide the .current-page element and using JavaScript, get the window.location.url and put its value into the .current-page input (the hidden SLT field).
Now you can use the hook [Current Page] in your email body.
Again, this is an untested idea, so I'm not sure if it will work.

How do you attach images to email in ASP.NET based on user selection (not upload)?

I have an email form that's written in ASP.NET and is fairly simple. The user fills out the normal information (name, email, phone, etc) and then they can choose an image thumbnail (it's an advertising creative sample). When they hit submit the recipient receives the form with all the information and the name of the creative they selected but I would like to embed or attach the thumbnail for the recipient so they can visually see it in the email.
Clients are all on Outlook 2010 with HTML email.
No images are being uploaded (they are in a thumbnail folder).
What I'm trying to figure out is how to call that thumbnail based on their selection and embed/attach it to the email when the user hits submit.
Everything I've found online deals with users uploading images and doing it that way.
Thanks
Send the email as HTML, and embed it as an image in the email. Make sure to embed the full path, so the user can view the image from anywhere too.
<img src="http://www.mysite.com/images/creative/foobar.png" ... />

Resources