Skip to content
A d365 CE package that would allow users to create visually rich email templates
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test/js
webpack
.eslintrc.js
LICENSE
README.md
jest.config.js
jsdoc.json
package.json

README.md

d365EmailTemplate (v8, v9)

A d365 CE package that would allow users to create visually rich email templates.

Installation

  1. Install NodeJS

  2. run npm i

  3. Modify these files to use your prefix_

    • prefix_d365EmailTemplate.pug
      • script(src="prefix_d365EmailTemplate.js" type="text/javascript")
    • prefix_email.ribbon.js
      • const wrName = "prefix_d365EmailTemplate.html"
  4. run npm run build:dev for development build (you have to increase the allowed email attachment size to 20480)

  5. run npm run build:d365EmailTemplate:prd and npm run build:email:prd for production build

the files will be in the dist folder

  1. Create 3 web resources

    • prefix_email.ribbon.js - js file that will launch the html web resource from a ribbon button. This will also pass the regarding object if available.
    • prefix_d365EmailTemplate.js - the main js file of the application
    • prefix_d365EmailTemplate.html - the main html file that hosts prefix_d365EmailTemplate.js
  2. Use the Ribbon Workbench to customize the Insert Template Button Command

    • Delete the default action
    • Add a new Custom JS action
      • Library: prefix_email.ribbon.js
      • Function Name: openD365EmailTemplate
      • Add Crm Parameter = PrimaryControl
  3. run npm audit fix - to check for any security vulnerabily. npm audit

Buttons

  • Entity - this lists all the entities that can be merge with templates. The check mark will indicate the current selected entity.
  • Template - this lists all the templates that are available for the selected entity. The check mark will indicate the current selected template. Clicking on a template will load it in the tinyMCE viewer below.
  • Attribute - this lists all the available attributes of the selected entity. When you click on an attribute it will add the attribute to the selected template.
  • Format - if you select a DateTime attribute, this button will appear to provie additional formatting options.
  • Save - after entering the new template name, click save to see the new template in the Template dropdown.
  • Merge - this will merge the selected template and place the resulting html to the "parent" email window.
  • Preview - this will show the result the merge.

Addtional Documentation

Security Status

Snyk Report

  • 11/25/2019 Medium Severity: Denial of Service (DoS) The npm-check is the package used to help maintain the versions of various packages used in this project. It is not used in the execution of project code. But if you prefer not having it, run npm remove npm-check. You can use npm update as an alternative.
You can’t perform that action at this time.