A comprehensive solution for managing and deploying Dynamics 365 Sales customizations, including themes, forms, views, dashboards, and web resources.
- Theme Management: Pull and deploy custom themes with color mappings
- Form Customizations: Track and deploy form modifications
- View Management: Manage custom views and filters
- Dashboard Configuration: Deploy custom dashboards and components
- Web Resources: Manage CSS, JavaScript, and HTML resources
- Version Control: Track all customizations in YAML format
- Backup System: Automatic backups before deployments
-
Install dependencies:
npm install
-
Configure environment:
- Copy
.env.exampleto.env - Add your Dynamics 365 credentials:
DYNAMICS_INSTANCE_URL: Your ForIT instance (https://forit.crm.dynamics.com)DYNAMICS_CLIENT_ID: Azure AD app client IDDYNAMICS_CLIENT_SECRET: Azure AD app secretDYNAMICS_TENANT_ID: Azure tenant ID
- Copy
-
Azure AD App Setup:
- Register an app in Azure Active Directory
- Grant Dynamics 365 API permissions
- Create a client secret
Download existing customizations from Dynamics 365:
npm run pull-themeDeploy local customizations to Dynamics 365:
npm run deploy-themeCheck customization file syntax:
npm run validateManually create a backup:
npm run backupThe main configuration file tracking all customizations:
- metadata: Instance information and sync status
- theme: Colors, typography, spacing, and branding
- navigation: Custom menu items and hidden elements
- forms: Entity form customizations
- views: Custom views and filters
- dashboards: Dashboard configurations
- workflows: Automated processes
- webResources: Custom CSS/JS files
- securityRoles: Role modifications
- plugins: Custom business logic
Custom styles and scripts stored in:
/webresources/styles/- CSS files/webresources/scripts/- JavaScript files
- Initial Setup: Configure environment and credentials
- Pull Existing: Download current customizations
- Modify Locally: Edit
customizations.yamland web resources - Test Changes: Validate configuration
- Deploy: Push changes to Dynamics 365
- Verify: Check changes in the Dynamics 365 interface
- Always pull before making changes
- Create backups before deployments
- Test in a sandbox environment first
- Use version control for tracking changes
- Document significant customizations
- Follow Dynamics 365 naming conventions
ForIT-DynamicsSales/
├── customizations.yaml # Main customization mapping
├── package.json # Project configuration
├── .env # Environment variables (not in git)
├── .env.example # Environment template
├── scripts/
│ ├── pullTheme.js # Pull customizations
│ ├── deployTheme.js # Deploy customizations
│ ├── validate.js # Validation utilities
│ └── backup.js # Backup utilities
├── webresources/
│ ├── styles/
│ │ └── custom.css # Custom styles
│ └── scripts/
│ └── validation.js # Custom scripts
└── backups/ # Automatic backups
- Never commit
.envfiles - Use Azure Key Vault for production secrets
- Implement proper RBAC in Dynamics 365
- Regular security audits of customizations
For issues or questions about Dynamics 365 customizations, consult: