How lagoesp/lowcodebutton works
Project Type & Purpose
• This project is a specialized Dynamics 365 extension (managed solution), designed to allow custom button integration into Dynamics environments.
• It enables developers and Dynamics customizers to register buttons, configure advanced settings, and tailor the payloads sent during user interactions (for forms, grids, and subgrids).
• The project bundles both TypeScript source code (in the src folder) and ready-to-deploy JavaScript assets (in the dist folder) along with generated metadata from Dataverse entities.
• User Interface Integration:
• Dynamics 365 Command Bar Designer / Ribbon Workbench: This is where the registered button is exposed to users.
• LowCodeButtonBase.js is the core JavaScript resource referenced in Dynamics that triggers the button click.
• Application Core (under src):
• Base Cases (src/Base_Cases): Contains base implementations to support different types of buttons (Form and Grid scenarios).
• Helpers (src/Helpers): Includes functions to prepare payloads and assist with form/grid related logic (e.g., ButtonFormHelper, ButtonGridHelper).
• Exceptions (src/Exceptions): Contains exception handling logic specific to button operations.
• Models (src/Models): Defines data structures and response models for button interactions.
• Dataverse Integration:
• dataverse-gen (src/dataverse-gen): Houses generated code for Dynamics metadata, including entities and enums. This module represents how the managed solution interacts with Dynamics data definitions.
• Build & Deployment:
• Webpack configuration files (webpack.common.js, webpack.dev.js, webpack.prod.js) along with tsconfig.json guide the build process from TypeScript source into distributable JavaScript (dist folder).
• The configuration files and package.json ensure consistency for deployment into the Dynamics environment.
• Supporting Artifacts:
• DataStructure folder: Contains additional supporting documentation (e.g., ERD text file, LCID Excel list) which provides reference data and design documents.
Visualizing Relationships & Interactions
• From user interactions on the Dynamics 365 UI to the registered JavaScript function (LowCodeButtonBase).
• From LowCodeButtonBase to specialized base cases (Form, Grid, Subgrid) that handle the event based on the type.
Architectural Patterns & Technologies
• The project follows a modular pattern:
• Separation of concerns by splitting logical functionality into Base Cases, Helpers, Exceptions, and Models.
• Clear division between design-time (source and build configuration) and deployment-time (dist folder used by Dynamics).
• Technology labels such as:
• TypeScript for the core logic.
• Webpack for bundling assets.
• Dynamics 365 integration via Command Bar Designer / Ribbon Workbench.
• Dataverse (MS Dynamics) metadata, represented in the generated dataverse-gen folder.