Latest Microsoft Dynamics 365 Blogs | CloudFronts - Page 2

Error Handling Techniques in Dynamics 365 Plugins

Posted On February 12, 2025 by Vidit Gholam Posted in Tagged in

Have You Ever Struggled with Debugging Errors in Dynamics 365 Plugins? If you’ve been working with Dynamics 365 plugins, you’ve likely encountered scenarios where your plugin failed unexpectedly. Debugging these failures can be a challenge, especially in production environments where attaching a debugger is not always an option. How do you ensure that errors are logged effectively? How do you prevent the plugin from breaking critical business processes? In this blog, I will walk you through the best error-handling techniques for Dynamics 365 plugins, ensuring that you can capture, log, and handle errors gracefully. Why Trust Me? As a Microsoft Certified Trainer and Dynamics 365 Consultant, I have extensive experience working with Dynamics 365 CRM, Power Platform, and Azure. Over the years, I have encountered and resolved numerous plugin errors in live environments. Through my blogs and speaking engagements, I have shared valuable insights on building robust and scalable solutions in Dynamics 365. This expertise allows me to provide you with practical and effective error-handling strategies that you can implement immediately. Understanding Plugin Execution and Error Scenarios Before diving into error handling techniques, let’s briefly understand the plugin execution model. Plugins in Dynamics 365 execute in the sandbox (isolated) mode or full-trust (non-isolated) mode and can be synchronous or asynchronous. Common error scenarios in plugins include: Now, let’s explore how to handle these errors effectively. 1.) Using Try-Catch Blocks for Exception Handling The simplest and most effective way to handle errors is by wrapping your plugin logic inside a try-catch block. Why This Works: 2.) Using ITracingService for Logging Dynamics 365 provides the ITracingService to log debug messages, which is particularly useful in sandboxed plugins where direct debugging is not possible. Benefits: 3.) Logging Errors to a Custom Entity For persistent logging, consider storing error details in a custom entity (e.g., Plugin Error Log). Why This Helps: 4. Using Secure Configuration for External API Calls If your plugin interacts with external APIs, store credentials in the secure configuration rather than hardcoding them. Benefits: 5. Handling Recursion and Infinite Loops Dynamics 365 allows detecting recursive plugin execution using Depth in IPluginExecutionContext. Why? Conclusion Error handling in Dynamics 365 plugins is crucial for maintaining stability and ensuring seamless business operations. By implementing try-catch blocks, using tracing services, logging errors to a custom entity, managing secure configurations, and handling recursion, you can build robust and maintainable plugins. I encourage you to apply these techniques to your plugins and explore additional monitoring tools like Application Insights for even better observability. Have you faced any plugin debugging challenges? Share your experiences in the comments below! We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfonts.com.

Share Story :

Easy JavaScript Examples for Dynamics 365 CRM – Repository

Are you tired of spending hours searching for the right JavaScript functions to use in Dynamics 365 CRM? If so, you’re not alone. Developers often struggle to find commonly used functions scattered across different sources, making it frustrating to build quick solutions or bug fixing. What if you had a single repository containing all the essential JavaScript functions at your fingertips? That’s exactly what this blog offers, a one-stop resource where you’ll find everything you need, from retrieving field values to automating actions on forms. With these functions in one place, you can save time, eliminate guesswork, and focus on creating impactful solutions for your Dynamics 365 projects. As a Microsoft Certified Trainer (MCT) and Microsoft Certified Professional, I’ve spent my career deploying Dynamics 365 solutions for organizations across the globe. My hands-on experience in architecting and implementing complex solutions has given me deep insight into the challenges developers face—one of the most common being finding and applying the right JavaScript functions efficiently. Let’s explore the most commonly used JavaScript functions for quick reference and seamless development Best Practices: Always check if a field or control is null before interacting with it. Keep JavaScript functions modular and reusable. Avoid using deprecated APIs, always follow the latest Microsoft documentation. Conclusion: JavaScript is a game-changer when it comes to customizing Dynamics 365 CRM, and having a go-to repository for commonly used functions can save you significant time and effort. With these functions at your fingertips, you’ll be better equipped to build dynamic forms, automate processes, and enhance the overall user experience. And smoother operations for your business. Now that you’ve explored these essential JavaScript functions, why not take your Dynamics 365 knowledge even further? Check out this blog on error handling in Dynamics 365 plugins to strengthen your expertise in server-side customizations as well. Bookmark this repo, and let’s make development faster and easier together!

Share Story :

What a Service Request Management System Would Look Like for a Growing Business 

Posted On July 23, 2024 by Vidit Gholam Posted in Tagged in

Introduction:   For growing businesses, as much as their processes, reports, and efficient systems are important, service request management becomes equally crucial. As companies scale, the volume and complexity of service requests increase, making efficient management essential to maintaining operational flow and customer satisfaction.   A well-designed Service Request Management System (SRMS) helps align workflows, reduce response times, and enhance service delivery.    In this article, we will cover what such a system typically entails and why it’s vital for a growing business.   Let’s look at some of the key components that make an SRMS most effective.   Now that we have covered the key components, let us look at what a service request management system should be like for a growing business and how to set it up. Here are some key points to consider.   Every company should establish a support email address (support@companydomain.com) to facilitate customer queries. Customers typically prefer using a support email over a phone number or support portal, making it the most convenient method for logging service requests.   Process flow diagram for a SRMS  Conclusion:   Having a solid service request management system (SRMS) is a game-changer for any growing business. By centralizing your service requests, automating processes, and setting clear expectations with SLAs, you can keep things running smoothly and keep your customers happy. Features like real-time updates, automatic case assignments, and a self-service portal make life easier for both your team and your customers. With these tools, you can handle more requests efficiently, ensure quick resolutions, and maintain high service standards as your business grows. Investing in a good SRMS means you’re building a responsive and customer-focused business that can thrive even as it expands.  Here is our featured Customer Success Story:    Revolution Cooking partnered with CloudFronts for Dynamics 365 enhancements and data integration with the third-party applications.  We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com  

Share Story :

Integrating Project Operations to Financial Platforms 

Introduction  Dynamics 365 Project Operations (PO) is a project management application within the Dynamics 365 suite. It is designed to manage project-related tasks, schedules, resources, and budgets. While they may include some financial functionalities, they often lack the comprehensive financial management capabilities that dedicated financial platforms offer.  In this article, we will explore several functions that Project Operations (PO) cannot perform as effectively as financial platforms like QuickBooks (QB) or Dynamics 365 Business Central (BC).  We will also discuss how to bridge this gap and create a seamless integration between Project Operations and these financial platforms.  Let’s first look at what Project Operations falls short of and what financial platforms like QuickBooks or Dynamics 365 Business Central can offer.  Accounting Functionalities  General Ledger Management: Financial platforms provide robust general ledger management, allowing for detailed tracking and reporting of all financial transactions across the entire organization.  Accounts Payable and Receivable: They manage accounts payable (AP) and accounts receivable (AR) efficiently, including invoicing, bill payments, and collections.  Tax Compliance: Financial platforms are equipped with tools to manage tax calculations, filings, and compliance with local and international tax regulations.  Financial Reporting: Financial platforms offer extensive reporting capabilities, including profit and loss statements, balance sheets, and customizable financial reports.  Audit Trails: Financial platforms maintain detailed audit trails of all financial transactions, which are crucial for internal audits and external regulatory audits. To leverage the Project Management features of Project Operations and the above-discussed features of financial platforms, businesses often choose to integrate both systems.  Integration Approach  Custom integration offers the utmost flexibility when connecting Project Operations with QuickBooks or Business Central. Several key considerations and entities are important to ensure a seamless integration: Data Mapping:  Tables: Identifying the key entities (Tables) such as projects, expenses, invoices, customers, vendors, contacts, and accounts that need to be synchronized between project operations and financial platforms.  Mapping: Map the fields and attributes of these entities between the two systems to ensure accurate data transfer and synchronization.  Tip: The best practice is to create mapping Excel for maintaining the table and column mappings between the systems.   Chart of Accounts (COA):  Chart of Accounts: Proper alignment between the chart of accounts in Project Operations and the financial platforms is necessary to facilitate accurate financial reporting and reconciliation.  Tip: Creating custom tables for your Chart of Accounts (COAs) and designating the financial systems as the source of truth for COAs is recommended. This approach offers flexibility to associate COAs with expenses, materials, roles, etc.  API Integration:  API Access: Check if the financial platforms offer APIs for integration.  Integration Points: Determine the integration points where data will be exchanged between the two systems, such as project creation, expense tracking, invoice generation, and payment reconciliation.  Data Flow:  Data Direction: Define the direction of data flow between Project Operations and financial platforms, ensuring consistency and integrity of data. The source and the target systems should be defined.  Real-Time Sync: Decide whether data synchronization will occur in real-time or through scheduled batch processes to meet business requirements. Currency:  Currency Conversion: Consider currency conversion requirements when dealing with contracts or transactions in multiple currencies.  Error Handling and Logging:  Error Handling: Implement mechanisms to handle data validation errors, inconsistencies, and exceptions during data transfer between systems.  Logging: Maintain logs of integration activities and errors for troubleshooting, audit trails, and compliance purposes.  Security:  Authentication: Implement secure authentication mechanisms to ensure data privacy and integrity during data exchange between systems.  Access Control: Define roles and permissions to restrict access to sensitive data and functionalities based on user roles and responsibilities.  Testing:  Testing: Set up a dedicated testing session to validate the integration setup, data mappings, and synchronization processes before deploying to production.  Integration process flow diagrams:  Create a process flow diagram for all the entities, for example below, is an integration process flow diagram for integrating Accounts, Contacts, Vendors from Project Operations to Quick Books.  In conclusion, while Project Operations is essential for managing the operational aspects of projects, it lacks the depth and breadth of functionalities offered by dedicated financial platforms.   Financial platforms provide accounting, regulatory compliance, advanced financial reporting, cash flow management, and more, which are crucial for the overall financial health and strategic planning of an organization.   Integrating these platforms with Project Operations tools leverages the strengths of both, ensuring efficient project management and robust financial oversight.  Here is our featured Customer Success Story:  Armexa, a leading US-based Industrial Cybersecurity Company, partnered with CloudFronts for Services Automation with Microsoft Dynamics 365 Project Operations and Business Central.   We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com

Share Story :

Get Owners of a Teams Channel Using Power Automate Flow

Posted On May 2, 2023 by Vidit Gholam Posted in Tagged in

With Power Automate it has become easier to post automated messages, and alert approvals in Microsoft Teams, in the following blog we will explore some Power Automate actions which will help us to send these alerts messages and approvals to Microsoft Teams Channel Owners only.  So let’s begin…!  Let’s say we have a Teams Channel with members, as shown in the snapshot below. We need to send approvals to the Owner of the channel only.  Here is how it is done,   Step 1: In power automate flow, search for Office 365 Group Action, and now select List all members action. Select the Teams name from the dropdown.  (Comments: When a Team is created it forms an Office 365 group)  Step 2: Here we will be using the Microsoft Graph API to get the owners of the group more about it in the doc – https://learn.microsoft.com/en-us/graph/api/group-list-owners?view=graph-rest-1.0&tabs=http  API : GET /groups/{id}/owners  To get the ID go to https://admin.microsoft.com/ and follow the snapshot below. (Comments: to get the id of the group you need to have admin privileges)  Step 3: After we run the flow, we get the output for step 2 as shown in the snapshot below.  So now we need to get the “mail” from the “value” from step 2, hence here we use a Select action in Power Automate to get the emails from the values from step 2.  Step 4: At last, we use a join expression to club the mails separated by (;)so that we can use them in the outlook action.  Power Automate Flow Screenshots:  Output: Hope this helps 😉

Share Story :

Restricted View Permission is not Visible in SharePoint Permissions

Posted On February 1, 2023 by Vidit Gholam Posted in Tagged in

I created a SharePoint site and was working on user permissions for a document library, I wanted to assign the Restricted View permission to a group but the permission was not visible. Below is the screenshot of the document library I created in my SharePoint and as you can see the Restricted View Permission is not available in the permission list. So how to make the permission available, the catch here is that it is only visible if there is a document uploaded in the document library (So you can upload a dummy document to your library and later delete it).  Hope this helps!

Share Story :

Remove Hover from Primary Navigation Bar Power App Portal

I had a requirement from a client to remove the hover from the header navigation on the customer portal. Here is how we do it, if we inspect, we can see that this is handled by a style element “.navbar-inverse .navbar-nav > li > a:hover“ Now if we removed the background colour here is how it looks. Now let’s make these changes in the code, edit your portal and open the portal in the Power Apps gallery and go to themes. Search for the style element and comment or remove the background colour. Hope this helps!

Share Story :

Button missing from ribbon Dynamics CRM (Field Service Work Orders)

Recently I faced issues with some of our custom and Out of the Box ribbon buttons disappearing for example look at the snapshot below. For any selected service order I was not able to see the Run Flow button which runs on-demand workflows and Power Automate Flow (and a few custom ribbon buttons as well). I investigated and found out that this happens because of a field service setting called “Show Simplified Work Order Command”. As per the document – https://learn.microsoft.com/en-us/dynamics365/field-service/configure-default-settings This setting influences the command bar on work order records and lists. By default, this field is set to Yes, which shows only the most relevant commands for work orders. The following commands will be hidden from the form: deactivate, check access, process, add to queue, queue item details, assign, share, email a link, flow, Word templates. The following commands will be hidden from the list view when no records are selected: email a link, flow, import from Excel. The following commands will be hidden from the list view when a record is selected: activate, deactivate, email a link, add to queue, flow, Word templates, Excel templates. When set to No, all commands are shown. To turn it off in your field service app go to settings from the change area and select Field Service Settings, under field service setting turn off Show Simplified Work Order Commands to No. Now we can see our run flow button along with a couple of other buttons. I hope this helps!

Share Story :

Custom Field Validation for Website Fields in Dynamics CRM

Posted On December 14, 2022 by Vidit Gholam Posted in Tagged in

Dynamics 365 provides functionality to create a text field of type website field where the user can type in the website name. But out of the box, it has no validation to validate if the user is actually putting a web URL or just a text value, this can be achieved using simple JavaScript.  In this blog, let’s see how to put a validation on a website field in CRM so that users enter the correct data.  I have created a website field in CRM and here is how it looks.  Using the below javascript code you can put a validation on this website field. Code:       validateWebsiteURL: function (formContext, fieldName) {          if (formContext.getAttribute(fieldName)) {              var websiteurl = formContext.getAttribute(fieldName).getValue();              if (websiteurl != “”) {                  var pattern = new RegExp(‘^(https?:\\/\\/)?’ + // protocol                      ‘((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|’ + // domain name                      ‘((\\d{1,3}\\.){3}\\d{1,3}))’ + // OR ip (v4) address                      ‘(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*’ + // port and path                      ‘(\\?[;&a-z\\d%_.~+=-]*)?’ + // query string                      ‘(\\#[-a-z\\d_]*)?$’, ‘i’); // fragment locator                  if (!pattern.test(websiteurl)) {                      formContext.getControl(fieldName).setNotification(‘Website: Enter a valid Website URL.’);                  } else {                      formContext.getControl(fieldName).clearNotification();                  }              }          }      }  I hope this helps 😉! 

Share Story :

Hide Profile Section from Power Apps Portal Header Navigation Bar

The Power Apps Portals Primary Navigation Header always has a section to the profile page as shown in the snapshot below.   It is possible to disable this by adding a Web Page Access Control Rule, this will restrict read access to the profile page, but what if you don’t want to remove the read access and you only want to remove the Profile Section from the header, here is how to do it.  The Primary Navigation or Navigation on the portal is a part of the portal’s Header Component, this header component comes from the Header Web Template, It is not possible to edit this template from the Power Apps Portal Studio. To be able to edit this template we will have to use the portal management app  Step 1: Go to Portal Management App, under templates search for Header Template.  Step 2: at line number 104 or after line number 95 search for Class “dropdown-menu” in an unordered list (ul) and comment the below code.  Ding!! We have done it.  Hope this helps 😉!

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange