Category Archives: Dynamics CRM
Comparing Asynchronous Patterns in C# and JavaScript
Asynchronous programming is essential for building responsive applications, especially when dealing with time-consuming operations like API calls, file I/O, or database queries. Both C# and JavaScript provide powerful tools to handle asynchronous code: Promises in JavaScript and Tasks in C#. However, managing these manually can lead to complex, nested code. Enter async/await—a syntactic sugar that makes asynchronous code look and behave like synchronous code, improving readability and maintainability. Async/Await in JavaScript JavaScript relies heavily on Promises for asynchronous operations. While Promises are powerful, chaining them can lead to callback hell. Async/await simplifies this by allowing us to write asynchronous code in a linear fashion. Scenario: Fetching User Data from an API Instead of chaining .then() calls, we can use async/await to make API calls cleaner. Without Async/Await (Promise Chaining) With Async/Await (Cleaner Approach) Benefits:✅ Easier to read – No nested .then() chains.✅ Better error handling – Structured try/catch blocks. Scenario: Sequential vs. Parallel Execution Sometimes we need to run tasks one after another, while other times we want them to run in parallel for efficiency. Sequential Execution (One After Another) Output: Parallel Execution (Faster Completion) Output: Async/Await in C# C# uses Tasks for asynchronous operations. Before async/await, developers relied on callbacks or .ContinueWith(), leading to complex code. Scenario: Downloading Files Asynchronously Instead of blocking the UI thread, we can use async/await to keep the app responsive. Without Async/Await (Blocking UI) With Async/Await (Non-Blocking UI) Benefits:✅ UI remains responsive – No freezing during downloads.✅ Clean error handling – try/catch works naturally. Scenario: Running Multiple Database Queries If we need to fetch data from multiple sources, async/await makes it easy to manage. Sequential Database Queries Parallel Database Queries (Faster Performance) Key Takeaways ✔ Use async/await to avoid callback hell in JavaScript and blocking calls in C#.✔ Sequential execution (await one by one) vs. parallel execution (Promise.all / Task.WhenAll).✔ Error handling is simpler with try/catch instead of .catch() or .ContinueWith().✔ Improves performance by keeping UIs responsive while waiting for I/O operations. By adopting async/await, you can write cleaner, more maintainable asynchronous code in both JavaScript and C#. 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 :
Optimizing Dynamics 365 Storage: Ways to Free Up Space
Maintaining optimal performance in Dynamics 365 (D365) requires proactive storage management. Running out of space can slow down your system, so it’s crucial to monitor storage usage and act before reaching capacity. Ideally, you should receive an alert when storage hits 80%, giving you time to take corrective action. How to Reduce Storage Consumption in D365 If your D365 environment is nearing its storage limit, here are some effective ways to reclaim space: When Documents Are the Culprit If storage remains tight after these steps, documents and attachments are likely the issue. Studies show that 70% of D365 storage is often consumed by files—especially if your organization stores emails within the CRM. Unfortunately, traditional cleanup methods may not be enough to free up space efficiently. A Better Approach: Integrate External Storage Solutions Since D365 is designed for customer relationship management—not document storage—relying on it for file storage can be costly. Instead, consider migrating documents to dedicated storage systems that offer: Popular options include: By offloading documents to these platforms, you can reduce D365 storage costs while improving efficiency. To encapsulate, proactive storage management ensures smoother D365 performance and avoids unnecessary expenses. Clean up unused data, then explore external storage solutions for long-term efficiency. Would you like recommendations on the best storage migration strategy for your business? Let us know in the comments! 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 :
Streamlining Document Uploads for Entities by Sales Team Members Using the Mobile Application
Uploading documents to Dynamics 365 through mobile devices can enhance the flexibility and efficiency of your team members. In this blog, I’ll Walk you through a step-by-step procedure for uploading documents using the **Sales Team Member** app on mobile devices. This guide focuses on document upload via the mobile version of Dynamics 365, showcasing how easy it is to manage files on the go. Whether you’re a Sales Team Member or an administrator, this simple process will help you streamline document management using the mobile application. The Use-Case: Uploading Documents in Sales Team Member Imagine a scenario where your team needs to upload documents related to orders, opportunities, or leads while out in the field. Using the Sales Team Member app, the document upload process is streamlined and works seamlessly. Here’s how you can do it: Key Components of the Solution PowerApps Mobile Application: This app provides an easy-to-use interface for users to interact with Dynamics 365 on their mobile devices, including document uploads. Document Upload in Dynamics 365: The process allows users to upload files to records in various entities such as Order Fulfillment, Leads, Opportunities, etc. SharePoint Integration: After uploading the document via mobile, it is stored in SharePoint, where it is accessible both on the mobile device and the web interface. Step-by-Step Process Step 1: Install the Power Apps Application Navigate to your App Store or Play Store, install the Power Apps app, and open it. Step 2: Sign In Sign in with your work account by adding it to the app. Enter your credentials when prompted. Step 3: Access the Sales Team Member App Once logged in, find and select the Sales Team Member app to access your required entities and records. Step 4: Navigate to the Order Fulfillment Entity To upload a document, go to the Order Fulfillment entity. The upload process is the same across all entities. Step 5: Upload the Document In the Order Fulfillment record, tap the Related tab, then select Documents. Tap the ellipsis (three dots) beside the Document Associated Grid and choose Upload. Select Choose File to upload the document from your mobile storage. Step 6: After selecting Upload, you’ll see a prompt. Tap Choose File to access your Gallery/File Storage. Select your desired file, then tap OK. Step 7: View Uploaded Document Once uploaded, the document will display on your mobile app, and you can also view it on the web version. The document will be stored in SharePoint and accessible from either platform. Mobile version: Web version: On opening the file, the file opens SharePoint and displays the document. To encapsulate, with the above procedure, Sales Team Members can easily upload documents via their mobile devices in Dynamics 365, making it easier to manage and share important files from anywhere. This streamlined process not only boosts efficiency but also ensures your team stays connected, even when working remotely or on the move. Hope this helps!!! 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 :
How to Display the ‘+New’ Quote Button Only for System Administrators Using JavaScript and Ribbon Workbench in Dynamics 365 CRM
Uploading and managing quotes efficiently is crucial for Dynamics 365 CRM users. However, sometimes you may want to restrict certain buttons, such as the ‘+New’ Quote button, to only users with specific roles, like the “System Administrator.” In this guide, I’ll walk you through how to achieve this by leveraging JavaScript and the Ribbon Workbench tool in Dynamics 365. This method allows administrators to control button visibility based on user roles, ensuring that only users with the correct permissions can access sensitive functionality. The Use-Case: Restricting Access to the ‘+New’ Quote Button for Non-Administrators. Imagine a scenario where your organization needs to ensure that only users with a “System Administrator” role can create new quotes in Dynamics 365. This is crucial for maintaining control over who can initiate important processes within your CRM system. Using JavaScript and Ribbon Workbench, you can easily customize the UI to hide the ‘+New’ Quote button for non-administrators. Here’s how this use case can be implemented: In this scenario, your team wants to ensure that only system administrators have access to the “+New” button for creating quotes in the system. For non-administrators, the button will be hidden from both the homepage subgrid and the main quote tab to prevent unauthorized users from creating quotes. By using the Ribbon Workbench tool, a custom JavaScript function is created to check if a user has the “System Administrator” role. If they do, the “+New” button remains visible, and they can create a new quote. For all other users, the button is hidden. Key Components of the Solution 1. Ribbon Workbench: The Ribbon Workbench tool allows you to customize the Dynamics 365 ribbon, enabling you to create custom buttons and define their visibility and actions. It is used to create the new custom “+New” Quote button, which replaces the default button while maintaining system integrity. 2. JavaScript Customization: Custom JavaScript is used to manage role-based access for the “+New” Quote button. The script checks the user’s role within Dynamics 365 to ensure that only users with the “System Administrator” role can view and use the button. This helps enforce security and restricts unauthorized users from creating new quotes. 3. Enable Rule for Button Visibility: An Enable Rule is set to control the visibility of the custom “+New” Quote button based on the user’s role. It ensures that only users with the “System Administrator” role can see and use the button, while hiding it for other users. 4. Custom Button Action (Command): The command linked to the custom “+New” button triggers a custom action (JavaScript function) to open the quote form. This ensures that the action associated with the button aligns with the business needs and provides a seamless user experience for administrators. Step-by-Step Process Sign in to Dynamics 365 using your URL, such as abc.dynamics.com, and enter your credentials or login to make.powerapps.com Create a solution and add the web resource. Once it’s done login to ribbon workbench from XRM toolbox and connect to your organization. After logging in, it is recommended to create a new solution for Ribbon Workbench in Dynamics 365. Ensure that no forms, views, charts, or other entities are included, as Ribbon Workbench may fail to upload the solution with excessive data. Only include the Quote entity with no additional dependencies. Ensure the existing +New Quote button is hidden, as modifying Microsoft-standard buttons is not recommended. Instead, create a new custom button and implement the functionality for creating a new quote Form using custom JavaScript. I have provided the code for this functionality as well. Ensure that the existing +New button for quote would be hidden from the homepage Subgrid and the quotes main tab. Next step would be to create a enable rule. Enable rule is used to control the visibility and availability of a button or command of the button. Name the id of your choice but make sure to add the suffix Enable Rule. Here, un-customised is set to False. By setting isCore (or Un customized) to false, you’re indicating that the button or element is a custom component, not part of the out-of-the-box (core) solution provided by Microsoft. This helps differentiate custom actions from the default ones in the system. Below is the code for the new quote form create and user role-based code. Make sure to select the Function name properly. After setting the enable rule, go to the Commands section in Ribbon Workbench and rename the command. A command defines the action triggered by a button click. Since this is a new button, you’ll need to add the custom form opening code. Below is the function for creating the form. Final Steps: Once the command is added, don’t forget to add the Enable rule that you have created above. Once the command is added, make sure to add all the rules we wrote into the custom button. The image also needs to be added so that the icon can be visible. My custom +New icon looks like this. Testing: Once everything is done, make sure Publish the changes. You can now try to log in from the user that has no System administrator role. Once logged in, you can see that button is not visible. Button will be only visible to user that have system Administrator role. User having no System Administrator role. You can see below that there’s no +New button displayed. To conclude, by following this guide, you can efficiently control the visibility of the ‘+New’ Quote button in Dynamics 365 CRM, making it accessible only to users with the “System Administrator” role. This ensures better control over who can create quotes in the system while maintaining the flexibility of user roles. 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 :
Data Flow with Array Filtering in Power Automate
When working with arrays in Power Automate, it’s common to need to filter or select a specific item based on certain attributes. Whether you’re handling JSON data from an API, processing records from a list, or managing dynamic content within a flow, efficiently identifying the right item is key. In this blog, we’ll explore a simple yet effective method to extract the desired item from an array using expressions in Power Automate. By the end, you’ll have a clear strategy to streamline your workflows and enhance the intelligence of your automation. In case you need to select an item from an array in Power Automate based on the value of a certain attribute, here’s how you can do it. Scenario You have an array of objects, and each object has a specific attribute. You want to efficiently select the object(s) where this attribute matches a particular value. As you see, the array of objects have different structure – All of them have an attribute called “key” and that’s the one you want to select and then process further. Let’s see how we do it. Filter Array Let’s see how you can select the item from the array based on the value of the “key” attribute instead of looping through all the items and matching. To encapsulate, by using this approach, you can efficiently select specific items from an array based on the value of a particular attribute, making your Power Automate flows more dynamic and tailored to your specific needs. 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 :
XRM Toolbox: Tools in enhancing the Dynamics 365 Solutions for Developers
As a Dynamics 365 developer, I spend a lot of time customizing and extending the platform to fit the specific needs of my clients. While the built-in tools are powerful, there are times when you need something a little more…well, magical. That’s where the XRM Toolbox comes in. Think of the XRM Toolbox as a developer’s Swiss Army Knife. It’s a collection of free, open-source tools that can supercharge your productivity and make your life a whole lot easier. Let’s dive into some of my favorite functionalities: 1. WebResource Manager: Say Goodbye to Tedious File Management Managing web resources in Dynamics 365 can be a real pain. You’re constantly uploading, updating, and deleting files, and it’s easy to lose track of changes. The Web Resource Manager from MscrmTools is a game-changer. It provides a user-friendly interface for managing all your web resources in one place. No more wrestling with folders and file paths! This tool has saved me countless hours, and I can’t recommend it enough. 2. SiteMap Editor: Editing the Sitemap Without Breaking Everything The thought of editing a Dynamics 365 Sitemap directly in XML sends shivers down my spine. One wrong keystroke, and you could bring your entire CRM system to its knees. The SiteMap Editor from MscrmTools is a lifesaver. It allows you to visually edit your sitemap components, create and manage areas, and update properties like icons and titles. It’s like having a magic wand for your Sitemap woes! 3. Ribbon Workbench 2016: Effortless Ribbon Customization Customizing the Dynamics 365 ribbon used to be a complex and error-prone process that involved manually editing XML files. Thankfully, those days are over! The Ribbon Workbench by Scott Durow lets you edit the ribbon and command bar directly within the XrmToolbox. You can add buttons, menus, and custom commands with just a few clicks. It’s a fantastic tool that makes ribbon customization a breeze. 4. FetchXML Builder: Crafting Powerful Queries Without Breaking a Sweat FetchXML is a powerful language for querying data in Dynamics 365, but it can be tricky to master. The FetchXML Builder by Jonas Rapp is an invaluable tool that simplifies the process. It provides a user-friendly interface for building complex queries, including aggregates, outer joins, and even queries that can’t be created in Advanced Find. Plus, it can generate C# code and OData strings from your FetchXML, making it a true developer’s companion. 5. Metadata Document Generator: Documenting Your Data Like a Pro Documenting your Dynamics 365 data can be a time-consuming chore. The Metadata Document Generator from MscrmTools automates this process by generating Word and Excel documents that contain detailed information about your entities and attributes. No more manually creating tables and copying data – this tool does the heavy lifting for you. These are just a few of the many amazing tools available in the XRM Toolbox. With its extensive functionality and ever-growing collection of plugins, the XRM Toolbox is an essential part of any Dynamics 365 developer’s toolkit. It’s a treasure trove of time-saving utilities that can make your development experience smoother, faster, and more enjoyable. So, if you’re a Dynamics 365 developer who wants to work smarter, not harder, I highly recommend checking out the XRM Toolbox. You won’t be disappointed! 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 :
Understanding Azure Function Trigger Methods and Recurrence Syntax in Dynamics 365
Azure Functions are a vital component of serverless computing, offering the flexibility to run event-driven code without the need to manage infrastructure. When integrated with Dynamics 365, they provide a robust mechanism for automating processes and extending the platform’s functionality. This blog explores Azure Function trigger methods and recurrence syntax, highlighting their relevance in Dynamics 365 scenarios. Azure Function Trigger Methods Azure Functions can be triggered by various events. These triggers determine how and when the function executes. Here are some commonly used trigger methods in Dynamics 365 integrations: 1. HTTP Trigger Example: 2. Queue Storage Trigger Example: 3. Timer Trigger Example: 4. Service Bus Trigger Example: Recurrence Syntax for Timer Triggers Timer Triggers in Azure Functions rely on CRON expressions to define their schedule. Understanding this syntax is crucial for scheduling Dynamics 365-related tasks. CRON Expression Format: Examples: 2. Run daily at 2:30 AM: 3. Run every Monday at 9:00 AM: Key Points: Integrating Azure Functions with Dynamics 365 To integrate Azure Functions with Dynamics 365: 4. For asynchronous processes, leverage Azure Storage Queues or Service Bus to manage workload distribution To conclude that, Azure Functions, with their diverse trigger options, provide unmatched flexibility for extending Dynamics 365 capabilities. The recurrence syntax in Timer Triggers ensures that tasks are executed precisely when needed, enabling efficient process automation. By combining these tools, organizations can unlock the full potential of Dynamics 365 in their digital transformation journey. 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 :
Unlock the Power of Power Pages: Building Websites with Dynamics 365
Power Pages, which was earlier known as Power Apps Portals, a powerful low-code platform from Microsoft, allows you to create websites seamlessly integrated with Dynamics 365. Whether you’re building a customer portal, a partner collaboration site, or an internal application, Power Pages makes it easy to deliver rich web experiences. Here’s a beginner-friendly guide to help you create your first Power Pages site. What is the difference between Normal Websites and Websites Created by Power Pages? Getting Started with Power Pages: Sign in to Power Pages:To get started, sign in to the Power Pages platform using your Microsoft account. If you don’t have one, create a new account. Once signed in, you’ll be taken to the Power Pages home screen where you can begin creating your site. Create a New Site:You can start by creating a site from scratch. Choose the “Start from blank” option or use one of the available templates to speed up your development process. Templates are pre-built designs that you can customize to fit your needs. Choose a Site Name and Web Address:Select a site name that reflects the purpose of the site (e.g., “Customer Portal” or “Partner Collaboration Site”). Choose an appropriate web address (URL) that aligns with your business branding. Power Pages will guide you through the process of selecting a domain name and integrating it with your site. Configure Site Settings:Once your site is created, you’ll be able to configure various settings such as branding, theme, and layout. Power Pages provides an intuitive interface where you can adjust these settings with minimal effort. Click to edit the Power Pages using the Studio. Design and Edit Your Site:Click to open and edit your site using Power Pages Studio. This drag-and-drop interface makes it easy to add content such as text, images, forms, and data from your Dynamics 365 system. The Studio allows you to customize the site’s design, layout, and interactive elements to create a rich user experience. Let’s add a section and select the column as per your wish. Select ‘List’ Select the table and the list of records you want to see in your Webpage This appears after adding the List. There is a notification to set up permissions on the list. Click on + New permission. Let’s Add roles and click Save. Now click Sync followed by Preview. Sync feature is to make sure that the changes made in the Power Pages Studio are reflected across the platform whereas Preview feature allows you to see a live, interactive version of your website before publishing it. This gives you the opportunity to review and test how the site will look and function for end users. Also, there is another way of editing and designing Power Pages. Why do we need Power Pages Management? While Power Pages Studio is designed for creating and designing websites, focusing on content, layout, and interactivity, the Power Pages Management App provides a separate interface for managing the operational, security, and administrative aspects of the site. Key Functions of Power Pages Management: The separation of responsibilities between the design and management aspects ensures that both designers and administrators can focus on their respective tasks without compromising the site’s functionality, security, or scalability. This division enhances the overall efficiency and flexibility of managing a Power Pages website. Happy Developing! 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 :
Triggering Custom Action Without Modifying the Record in Dynamics 365 using JavaScript
In Dynamics 365, custom actions allow you to perform specific business logic, such as sending emails, making calculations, or calling external services. Often, these actions are triggered based on field updates or changes to records. However, there may be situations where you want to trigger a custom action through a button click, without modifying any record fields or triggering unnecessary updates. In this blog, we’ll explore how to use a button to trigger a custom action for a creating a specific task record in Dynamics 365 using JavaScript, that too, without modifying the record. Here’s the JS code used to trigger the action: Attach the JavaScript function to the button ‘Create Task’ event of the Case form, so that every time a case is created, the follow-up task is automatically generated. Click on the ‘Create Task’ button. And here, we have the follow up task created. Happy Developing! 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 :
Building Custom Solutions with Low-Code Plugins: Part 1- Overview
Low-code development has revolutionized the way businesses build software applications. By providing a visual, drag-and-drop interface, low-code platforms enable developers to quickly create complex applications without writing much code. However, even with the power of low-code platforms, there may be times when you need to extend their capabilities to meet specific business requirements. This is where low-code plugins come into play. Low-code plugins are small pieces of software that can be added to a low-code platform to extend its functionality. In this blog post, we will discuss the benefits of using low-code plugins, the steps involved in creating them, and some tips for successful development. Benefits of Using Low-Code Plugins Low-code plugins offer a number of benefits for businesses, including: Steps in Creating a Low-Code Plugin The process of creating a low-code plugin typically involves the following steps: Tips for Successful Low-Code Plugin Development Here are some tips for developing successful low-code plugins: Example Use Cases Low-code plugins can be used to solve a variety of business problems. Here are some examples: Conclusion Low-code plugins offer a powerful way to extend the capabilities of low-code platforms and create custom solutions that meet specific business needs. By following the steps outlined in this blog post and incorporating the tips for successful development, you can effectively leverage low-code plugins to drive innovation and achieve your business objectives. Later we will see working of the Low-Code Plugin in Dynamics 365 CRM with an example. 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.
