DEV Community

Hamza Khan
Hamza Khan

Posted on

I Built an Extension That Makes Dynamics 365 Development 10x Faster

If you've ever developed on Microsoft Dynamics 365, you know the pain.

You want to check a field's logical name — open the form editor.
You want to see which plugins fire on Save — open the Plugin Registration Tool.
You want to test a Web API call — open a separate tab, write the code, run it.
You want to fill a form with test data — do it manually, field by field.

I got tired of switching between tools constantly, so I built Dynamics CRM Dev Helper — a Chrome/Edge extension that puts everything you need directly inside the CRM form.


What It Does

The extension adds two things:

1. A toolbar popup with one-click quick actions:

  • Unhide all hidden fields, tabs, and sections (click again to re-hide only the ones that were originally hidden)
  • Unlock all locked fields for testing (click again to restore only the originally locked ones)
  • Fill every field with realistic dummy data based on its type — text, number, date, option set, boolean, email, phone (click again to restore original values)

2. A floating draggable dev panel with 7 tabs that stays on top of your CRM form.


The 7 Tabs

📋 Fields

See every attribute on the current form — logical name, display name, type, required level, current value, visibility, and lock state. Filter and sort in real time. No more guessing what a field is called.

🔗 Relationships

Browse One-to-Many, Many-to-One, and Many-to-Many relationships for the current entity with schema names and referencing attributes — all without leaving the form.

</> API Generator

Select fields and instantly generate ready-to-use code:

  • JavaScript Web API (Xrm.WebApi.retrieveMultipleRecords)
  • C# QueryExpression
  • FetchXML

One click to copy. Works on any Dynamics page.

▶ API Tester

This one is my favourite. Pick any entity from a live searchable dropdown, select an operation (Retrieve, Create, Update, Delete, or Custom JS), browse fields with type badges, and run the call directly inside the CRM page context. Results show up as a collapsible JSON tree with execution time. No Postman, no separate tab.

λ Plugin Execution Viewer

See every plugin step registered against the current entity — grouped by message (Create, Update, Delete…), with stage, sync/async mode, class name, assembly, and rank. You no longer need to open the Plugin Registration Tool just to check what's attached.

{} Form Script Viewer

List all JavaScript libraries and event handlers on the current form, grouped by event type (OnLoad, OnSave, OnChange). See function names, source libraries, enabled state, and execution context flag at a glance.

⚖ Business Rule Inspector

Browse all business rules for the current entity. Filter by Active/Inactive, see scope and condition/action counts, and expand any rule to read its description.


Smart Form Detection

Tabs that need a form context (Fields, Relationships, Plugins, Scripts, Rules) show a clear "No form open" message if you're on a list view or dashboard. API Generator and API Tester work anywhere on a Dynamics page.


Tech Stack

  • Manifest V3 Chrome extension
  • React 18 + Vite for the dev panel UI
  • Vanilla JS for content and injected scripts (no framework overhead in page context)
  • postMessage relay chain — panel → content script → injected bridge → Xrm API → back
  • OData Web API for metadata queries (entity definitions, plugins, forms, workflows)
  • DOMParser to parse formxml from systemforms for the script viewer
  • AsyncFunction constructor to run user code in page context (same pattern D365 uses internally)

No backend. No external servers. No telemetry. Everything runs locally in the browser against the user's own org.


What I Learned

Building this taught me a few things worth sharing:

1. Manifest V3 iframe communication is tricky.
The panel runs inside an iframe injected into the CRM page. Getting messages from the React panel → content script → injected bridge → back required a careful relay chain with promise-based timeouts and a shared injection promise to prevent double injection race conditions.

2. OData on Dynamics has quirks.
The EntityDefinitions endpoint doesn't support $filter or $orderby — it throws HTTP 400. Had to fetch everything and sort client-side. Took an embarrassing amount of time to figure out.

3. position: fixed is your friend in extensions.
Dropdowns inside overflow: hidden containers get clipped. Using position: fixed with getBoundingClientRect() to calculate coordinates was the cleanest escape hatch.

4. Snapshot pattern for reversible actions.
Every toggle action (hide/show, lock/unlock, fill/clear) captures a snapshot of the original state before acting. On reverse, only the snapshotted elements are restored — not everything. This was key to making the quick actions feel predictable.


Try It

The extension is live on the Microsoft Edge Add-ons store:
🔗 https://microsoftedge.microsoft.com/addons/detail/dynamics-crm-dev-helper/cjhdddgcjihpbldjjaaeaeblhiiagokm

Chrome Web Store submission is in progress.

If you work with Dynamics 365 daily, give it a try. I'm actively adding features — suggestions are very welcome.


What tools do you use to speed up Dynamics 365 development? Drop them in the comments — always looking for ideas.

Top comments (0)