Install Templ8r and wire it to your entities
Download Templ8r.zip (code only — no entity wiring), import it, then create your own unmanaged solution to add the Generate command to whichever tables you want. ~15 minutes.
Templ8r ships as a Dynamics 365 solution containing ten web resources — modal, side pane (HTML + controller JS), history view, bulk-generate UI, ribbon/command JS (ts_templ8r-generate.js, home of Templ8r.openGenerate), portal SPA host, MSAL helper, vendored MSAL bundle, and the MSAL redirect handler — plus a favicon. It deliberately does not pre-wire the ribbon button to any specific entity. You decide which tables get the button via your own unmanaged solution — the wiring step described below.
Before you start
- You're a Dataverse System Administrator in the target environment.
- Templ8r's Application User exists in your tenant. If onboarding hasn't run yet, do admin-consent first.
Step 1 — Download
Download the latest release: templ8r.co.uk/download/Templ8r.zip. The asset is Templ8r.zip, ~220 KB.
Step 2 — Import the solution
- Open make.powerapps.com and pick the right environment in the top-right selector.
- Solutions → Import solution. Upload
Templ8r.zip. - Accept the import dialog. Wait ~60 seconds for "Solution imported successfully".
- Open the new Templ8r solution. You'll see ten web resources (plus a favicon). No ribbon button yet — that's the next step.
Step 3 — Create your own unmanaged solution
All your per-entity wiring lives in a separate, unmanaged solution that you own. This keeps the managed Templ8r solution clean — when we ship a Templ8r upgrade, your wiring stays put.
- Solutions → + New solution.
- Display name: e.g. Acme Templ8r Wiring. Publisher: your existing one (don't reuse Templ8r's publisher).
- Click Create.
Step 4 — Add target entities + the Generate command
Repeat this section for every entity you want the ribbon button on (Sales Order, Quote, Account, Invoice, custom tables — anything in your tenant).
- Inside your unmanaged solution: + Add existing → Table → pick the entity. Tick Include table metadata + the form(s) you'll use. Click Add.
- Click the table → Commands tab → + New command bar button → choose Main form.
- Set Label to Generate document. Pick a file/download icon from the gallery.
- Action → Run JavaScript:
- Library:
ts_templ8r-generate.js - Function:
Templ8r.openGenerate - Parameters:
PrimaryControl(CommandProperties)
- Library:
- Save and Publish the command bar.
Optional — bulk generate from a grid
On the same table, do Commands → Main grid instead of Main form:
- Function:
Templ8r.openBulkGenerate - Parameters:
SelectedControlSelectedItemReferences
Users select 2+ rows in the grid view → click the button → Templ8r fans the chosen template across each record.
Optional — per-record history
Add a second Main form command pointing at Templ8r.openHistory with parameter PrimaryControl. Users get a "Generation history" button that lists every doc ever generated against the current record.
Step 5 — Test it
- Open a record on one of the entities you wired.
- Click Generate document. First time only: you may see a small Microsoft popup that auto-closes within a second — that's MSAL silently exchanging your existing AAD session for a Templ8r token.
- The Templ8r modal opens, listing templates available to your D365 security role. Pick one → click Generate.
- Within ~1–3 seconds, the modal shows download buttons + an "Open in D365" link. Refresh the form and check the Timeline — your Word + PDF are attached.
Nothing happens when I click the button
Hard-refresh the page (Ctrl-Shift-R, or Cmd-Shift-R on macOS). D365 caches web resources aggressively after import; the modal won't load until your browser picks up the new JS. If the button is missing entirely, double-check that the command is on the right form (some tables have multiple) and that you clicked Publish.
Modal opens but stays blank with an MSAL error in the console
If you see redirect_uri_mismatch (AADSTS50011): your D365 host is normally registered automatically when you run /onboard/auto, so this is rare. Re-run the onboarding check to retry the auto-registration; if it still fails, email support@templ8r.co.uk with your D365 URL and we'll add it manually (one minute on our side). If you see consent_required, your Global Admin needs to (re-)run the admin-consent step.