JavaScript Archives -

Category Archives: JavaScript

How to Connect Dynamics 365 Field Recommendations to Custom Logic with One Click

☼ Light ☶ Sepia ☽ Dark 01Summary During a recent Dynamics 365 implementation for a customer in the manufacturing industry, we came across a simple but important user experience requirement: when the Target Margin exceeded 45%, users needed to know about it and have an easy way to correct it. Rather than interrupting the user with a hard error or adding another button to the form, we used the native field recommendation control to provide guidance directly where the decision was being made. With a single click, the user can set the Target Margin back to 45%, trigger the field’s existing logic, and receive confirmation that the change was made. 02In This Blog This blog explores a simple but useful way to make Dynamics 365 forms more interactive using field recommendations. The Scenario: A Target Margin above 45% needs attention, but we don’t want to interrupt the user with a hard error. The Approach: Use the native Dynamics 365 field recommendation to place the guidance right where the user needs it. The Action: Give the user a one-click option to set the Target Margin back to 45%. The Outcome: Update the field, trigger its existing logic, and show a simple confirmation all without adding a new button, plugin, or complex customization. A small recommendation, a single click, and a much smoother user experience. Table of Contents 01Summary→ 02In This Blog→ 03Business Challenges→ 04Solution Overview→ 05Technical Approach→ 06Impact→ 07Conclusion→ 08FAQ→ 09Get in Touch→ 03Business Challenges Most teams that want to nudge a user on a specific field end up reaching for something heavier than the problem needs. A business rule can show an error or a warning, but it only fires on save or on change, and it cannot run a custom action when clicked. A ribbon button can call a script, but it sits at the top of the form, disconnected from the field it actually relates to. A form notification banner can carry a message, but it does not support a click handler, so it cannot open a dialog or call an action. None of these give a user a visual cue on the field itself that also does something when clicked, which is what teams ask for when they say ‘can we show a hint here and let them act on it’. The field recommendation control already exists in the platform for exactly this gap, but it is easy to miss because Microsoft’s own documentation covers the property, not the click through pattern most teams actually want. 04Solution Overview Dynamics 365 already ships a feature called field recommendations, the small lightbulb icon that can appear next to a field when the platform or a customization wants to draw attention to it. We set a recommendation on a field with a short message and a clickable action. When a user clicks the icon, the form runs a JavaScript function we registered against it. Here that function opens an alert, in a live rollout it can just as easily open a business process step, set a related field, or launch a quick create form. Why not a business rule or a ribbon button A business rule stops the user after they try to save or change the field. A ribbon button sits away from the field it concerns. The recommendation icon shows up on the field itself, before the user moves on, and it is the only one of the three that supports a click through action out of the box. 05Technical Approach Register the OnLoad handler (or trigger on any event)Add the JavaScript web resource to the form and bind a function to OnLoad, passing the execution context. Get the field controlInside the handler, call formContext.getControl on the target field. Attach the recommendationCall addNotification on that control with notificationLevel set to RECOMMENDATION, a message, a uniqueId, and an actions array pointing at the click handler. Handle the clickThe action function fires when the user clicks the icon. In this build it opens an alert dialog, nothing more. Clear it when resolvedOn the field’s OnChange event, check the condition and call removeNotification with the same uniqueId once it no longer applies. new_recommendation.jsjavascript function onLoad(executionContext) { var formContext = executionContext.getFormContext(); var attribute = formContext.getAttribute("cf_targetmargin"); if (!attribute) { console.error("cf_targetmargin attribute not found."); return; } attribute.controls.forEach(function (control) { control.addNotification({ messages: [ "The Target Margin must be below or equal to 45%, would you like to set the Target Margin accordingly?" ], notificationLevel: "RECOMMENDATION", uniqueId: "targetMarginRecommendation", actions: [ { message: "Set Target Margin to 45%", actions: [ function () { attribute.setValue(45); attribute.fireOnChange(); Xrm.Navigation.openAlertDialog({ text: "You have successfully changed the Target Margin to 45%.", title: "Target Margin Updated" }); console.log("Target Margin successfully set to 45%."); } ] } ] }); console.log("Recommendation added to: " + control.getName()); }); } Setting Value Event OnLoad and Field OnChange Library new_recommendation.js Functions onLoad, onDiscountChange Pass execution context Yes Field discountpercentage Form event registration ⚠Recommendations do not clear themselves addNotification puts the icon on the field and leaves it there until removeNotification is called with the same uniqueId. If a user fixes the value and moves on without an OnChange handler removing it, the lightbulb stays lit. We missed this in the first pass and had testers reporting a stuck icon that never went away. You can use multiple recommendations by linking them with unique IDs. This will help to handle multiple calls else there would be issue in adding, removing and calling functions. How this looks on the form. The bulb icon next to the field. Once user clicks to accept recommendation. Action is fired and makes the desirable changes. 06Impact 1web resource deployed 0plugins or workflows added 1 clickfrom field icon to custom action 40 linesof JavaScript in the handler The recommendation fires while the user is still on the field, not after they try to save. One JavaScript file replaced what would otherwise be a business rule, a ribbon button, and a separate form notification. 07Conclusion Field recommendations are a small, easy to miss control in … Continue reading How to Connect Dynamics 365 Field Recommendations to Custom Logic with One Click

Share Story :

Closing the Loop on Return Logistics: How a U.S.-Based Consumer Appliance Manufacturer Automated FedEx Shipment Tracking in Dynamics 365 Customer Service

Summary Our previous article (Check out my previous blog here – Transforming Return Logistics for a USA Manufacturer: Automating Shipment Processing with Dynamics 365 Customer Service) covered how we integrated Dynamics 365 Customer Service with FedEx to automate the creation of return shipments for a USA-based manufacturer — solving the shipment-creation half of the requirement. But creating a shipment is only the start. Once a package leaves the customer, the business still needs to know what’s happening to it — has FedEx received it, is it still with the customer, or has it been delivered? Previously, agents answered this manually by checking the FedEx site case by case, which didn’t scale. The second phase closes that gap with a scheduled integration between Dynamics 365 Customer Service, Dataverse, Integration, and the FedEx Tracking API. It automatically identifies eligible Cases, pulls the latest FedEx tracking events, determines whether the shipment has entered FedEx possession, and updates the Case accordingly. The result is a closed-loop process: Create Shipment → Capture Tracking Number → Monitor Shipment → Detect FedEx Possession → Update CRM. This article covers how the integration was designed, how tracking events were interpreted, how Integration processes the API response, and the technical considerations involved in building against the FedEx Tracking API. Table of Contents From Shipment Creation to Shipment Visibility The Business Challenge Solution Overview Identifying Cases Requiring Tracking Calling the FedEx Tracking API Understanding FedEx Tracking Events Determining Whether a Shipment Has Been Tendered Updating Dynamics 365 Customer Service Handling Exceptions and Empty Tracking Responses Technical Architecture Designing the Integration Around Business Events Business Impact FedEx Tracking API Limitations and Guardrails Final Thoughts This Blog Explains Why shipment creation alone was not enough to complete the return logistics process. How Dynamics 365 Customer Service was connected to the FedEx Tracking API. How eligible Cases are identified automatically. How tracking events such as Dropped Off, Picked Up, and In FedEx Possession are interpreted. How the solution determines when a shipment should be considered tendered. How the latest tracking information is written back to Dynamics 365. How Integration handles API responses and exceptions. The limitations and throttling considerations of the FedEx Tracking API. From Shipment Creation to Shipment Visibility In the previous implementation article (Check out my previous blog here – Transforming Return Logistics for a USA Manufacturer: Automating Shipment Processing with Dynamics 365 Customer Service), the primary objective was to eliminate the manual process of creating FedEx return shipments. The customer service representative could initiate the shipment directly from the Dynamics 365 Case. The system handled the rest: Collect Case and customer information. Register the shipment with FedEx. Generate the return label. Capture the tracking number. Store the tracking number against the Case. Send the return label to the customer. That created a significant improvement in the shipment creation process. However, there was still a gap. The tracking number was now inside Dynamics 365, but the shipment status was still outside Dynamics 365. This highlighted an important principle in integration design: True integration goes beyond just creating data in an external system—its real power lies in closing the information loop. By including end-to-end shipment tracking, we ensure full visibility, proactive exception management, and a seamless experience from order creation to final delivery. The second phase therefore asked a different question: Once Dynamics 365 creates a shipment, can it also continuously understand what is happening to that shipment? The answer was yes. The Business Challenge The existing process (Before FedEx Intg. Was implemented) required customer service representatives to manually monitor return shipments. A typical workflow looked like this: Open Dynamics 365 Customer Service. Find the Case. Copy the FedEx tracking number. Open the FedEx tracking website. Enter the tracking number. Enter the tracking number. Review the latest shipment event. Review the latest shipment event. Determine whether the package had been handed over to FedEx. Return to Dynamics 365. Update the Case status. Repeat the process for other Cases. This created several operational challenges. 1. Repetitive Manual Work Tracking information had to be checked repeatedly for multiple shipments. 2. Context Switching Agents moved between Dynamics 365 and the FedEx tracking website to complete a single business process. 3. Delayed CRM Updates Even when FedEx had already received a shipment, the corresponding Case could remain unchanged until somebody manually checked it. 4. Human Interpretation FedEx returns multiple tracking events and statuses. Agents had to interpret those events and determine which ones represented meaningful milestones for the organization’s return process. 5. Poor Scalability As the number of return shipments increased, the amount of manual tracking increased with it. The business did not need another screen for agents to monitor. It needed the tracking information to come back to the system where the business process was already being managed: Dynamics 365. Solution Overview I extended the previous FedEx integration by introducing an automated shipment-tracking process. The solution uses: Dynamics 365 Customer Service Dataverse Integration FedEx Tracking API The high-level process is: Dynamics 365 Customer Service | v Active Cases with Tracking Numbers | v FedEx Tracking | v Tracking Response | v Interpret Scan Events | v Determine Shipment Status | v Update Dynamics 365 Case The process runs automatically on a scheduled basis. There is no requirement for a customer service representative to manually visit the FedEx website for every shipment. Functional Integration Approach The functional design was intentionally centered around the existing Case lifecycle. The Case already contained the information required to identify the shipment. The integration therefore did not introduce a separate tracking application or another user interface. Instead, it used the Case itself as the operational source of truth. The process can be summarized as: Scheduled Trigger ↓ Find eligible Cases ↓ Read Tracking Number ↓ Call FedEx Tracking API ↓ Read Tracking Events ↓ Interpret Latest Status ↓ Determine Tendered / Not Tendered ↓ Update Case This approach keeps the integration aligned with the business process rather than creating a separate operational process around the API. Identifying Cases Requiring Tracking … Continue reading Closing the Loop on Return Logistics: How a U.S.-Based Consumer Appliance Manufacturer Automated FedEx Shipment Tracking in Dynamics 365 Customer Service

Share Story :

From Quote to Signed Contract in Minutes: Automating Adobe Acrobat Sign Integration for an Australia based Linen and Garments company

Summary Automated end-to-end contract generation, digital signing, and document filing for an Australia-based commercial linen and garments company using Dynamics 365 Sales, Microsoft Power Automate, and Adobe Acrobat Sign. Eliminated manual contract preparation by generating personalized Word contracts directly from accepted Dynamics 365 Quotes using a reusable Word template. Leveraged Adobe Acrobat Sign text tags embedded within the Word template to automatically create signature, date, and fillable fields without manual field placement or custom development. Automated agreement creation, customer notifications, and real-time signing status tracking through Adobe Acrobat Sign, providing complete visibility throughout the contract lifecycle. Implemented a dedicated child Power Automate flow that automatically identified completed agreements from Adobe Sign emails and archived signed contracts into the correct SharePoint document library. Reduced contract turnaround from a manual, multi-step process to a one-click, fully automated workflow while ensuring audit-ready signed documents and eliminating manual document handling. Table of Contents Introduction Business Challenge Procedure End-to-End Flow Why This Approach Works Conclusion Introduction For any business that runs on contracts — service agreements, quotes-turned-orders, vendor sign-offs — the gap between "quote accepted" and "contract signed" is often where deals slow down. Manual document preparation, back-and-forth emails, chasing signatures, and manually filing signed copies all eat into time that should be spent serving the customer. For an Australia based Linen and Garments, a commercial textile services company, CloudFronts built an end-to-end automation that takes a sales quote all the way through to a fully signed, filed contract — with zero manual document handling in between. The solution combines a Word contract template, Microsoft Power Automate, and Adobe Acrobat Sign, orchestrated across two connected flows: a parent flow that creates and sends the contract, and a child flow that listens for the signed response and files it automatically. This post walks through how that solution works, including the one detail that makes the whole thing possible without any custom code: Adobe Sign text tags embedded directly inside the Word template. The Business Challenge Once a quote is accepted, the team needed the resulting contract to: Be generated automatically from the quote and its line items — no manual copy-pasting of customer details into a Word document. Be sent for signature immediately, with the right fields ready for the customer to fill in and sign — bank details, account information, and a signature block, all in the right place. Notify both the customer and the internal Adobe Sign account holder the moment it’s out for signing. Automatically file the final, fully signed PDF back into the correct SharePoint location tied to that quote — without anyone needing to remember to save it. Doing this by hand across multiple people and mailboxes was slow and error-prone. The goal was to make the entire journey — quote to signed, filed contract — happen in minutes, with no manual document work at any step. Procedure Step 1: Auto-Generating the Contract from the Quote The process starts with a single action: Create Contract. This triggers the parent Power Automate flow, which: Composes the Quote ID from the selected record. Retrieves the document location tied to that quote (the Word contract template). Pulls the Quote, the associated Customer, and the Contact record for the signer. Uses these to populate a Word template — the standard “Populate a Word Template” merge step — filling in customer name, contract terms, line items, and contact details automatically. This is the same idea used in most contract-automation flows: merge structured CRM/quote data into a pre-built Word template, so the resulting document is fully personalized without a single manual edit. Step 2: Making the Contract Signable — Text Tags in the Template This is the step that makes the entire signing experience work, and it's worth explaining properly, because it's easy to get wrong. A merged Word document, by itself, is just static text. For Adobe Acrobat Sign to know where a customer needs to sign, initial, or fill something in, the template needs special markers called text tags — plain text strings embedded directly into the Word template before it's ever merged. When the finished document is sent to Adobe Sign, Adobe automatically scans it, finds these tags, and converts them into live, interactive fields for the signer. For the contract, the template includes tags like: {{Customer_Sign_es_:signer1:signature}} {{Date_Of_Signature_es_:signer1:date}} {{Financial_Institution_es_:signer1}} {{BSB_Number_es_:signer1}} {{Account_Name_es_:signer1}} {{Account_Number_es_:signer1}} Each tag follows Adobe's syntax: a field name, the _es_ identifier, the signer role (signer1), and an optional field type (signature, date, or left blank for a plain fillable text box). Because these tags are just text, they can sit anywhere in the Word template exactly where the business wants the field to appear — no separate field-placement tool required. Getting this right matters more than it looks. A few lessons learned building this out: The entire tag must stay on a single line and in a common font — if it wraps across a line break during merge or PDF conversion, Adobe won’t recognize it, and the raw tag text stays visible instead of becoming a field. Field type directives are limited to what Adobe actually supports (signature, date, initials, etc.) — leaving the type off entirely creates a plain fillable text field, which is what was used for the banking detail fields here. Converting the merged Word document to PDF before sending it to Adobe Sign tends to produce more consistent tag detection than sending the raw .docx. Because the tags are static text baked into the template, no extra configuration is needed in Power Automate to "activate" detection — it happens automatically the moment the document is sent to Adobe Sign for signature. Step 3: Sending the Contract for Signature Once the Word template is fully populated, the flow hands it off to Adobe Acrobat Sign using the Create an agreement from a file content and send for signature action — passing the merged file straight through, along with the signer's name, email, and role. At this point, two things happen simultaneously: a) The customer's Contact person receives … Continue reading From Quote to Signed Contract in Minutes: Automating Adobe Acrobat Sign Integration for an Australia based Linen and Garments company

Share Story :

From Quote to Signed Contract in Minutes: Automating DocuSign Integration for an Australia-Based Commercial Laundry Services Company

From Quote to Signed Contract in Minutes | Cloudfronts DocuSign Blog Summary Automated end-to-end contract generation and digital signing for an Australia-based commercial linen and garment services company using Dynamics 365 Sales, Power Automate, and DocuSign. Eliminated manual contract preparation and PDF email workflows, replacing them with a one-click process triggered directly from the Dynamics 365 Quote record. Integrated DocuSign envelope creation, recipient assignment, and signature tab placement — all orchestrated through Power Automate cloud flows. Enabled real-time contract status tracking and automatic archival of signed PDF contracts back into SharePoint, linked directly to the originating Quote. Reduced contract turnaround time from days to hours, allowing the sales team to focus on customer relationships rather than administrative paperwork. Delivered a seamless customer experience — recipients receive a professionally formatted DocuSign email and can sign digitally from any device. Table of Contents 01 Summary 02 Introduction 03 The Business Problem 04 The Solution 05 Implementation 06 Business Impact 07 FAQs 08 Conclusion Introduction In industries where service agreements govern weekly delivery schedules, pricing structures, and compliance obligations, the speed and accuracy of contract execution can directly impact revenue and customer satisfaction. For commercial textile and linen services businesses in Australia, every signed contract represents a new route, a new customer, and a new revenue stream. Yet for many organisations, the final leg of the sales journey — converting an approved quote into a signed, legally binding contract — remains a surprisingly manual, error-prone process: exporting Word documents, emailing PDFs, chasing signatures, and manually filing returned documents. This blog documents how we at Cloudfronts transformed that process for a leading Australian commercial linen and garment services provider — deploying a fully automated DocuSign integration within Microsoft Dynamics 365 and Power Automate to take contracts from generation to signature without any manual intervention. The Business Problem Our client operates across multiple depots in Australia, servicing hotels, aged care facilities, hospitality venues, and healthcare providers with regular linen and garment delivery contracts. Their sales team works within Dynamics 365 Sales Hub, managing quotes that detail complex pricing, delivery schedules, weight-based charges, and product schedules. Before the integration, the contract signing process looked like this: A sales representative would generate a contract Word document from a template. The document was manually reviewed and converted to PDF. The PDF was emailed to the customer’s contact for signature. The customer would print, sign, scan, and return the document. The signed document would be manually uploaded to SharePoint and linked to the quote. This process introduced several critical pain points: Delays of 3–7 business days waiting for customer signatures. Inconsistent document versions being sent to customers. No visibility into whether a contract had been opened, reviewed, or signed. Risk of lost or misplaced signed documents. Significant administrative burden on the sales team. The business needed a solution that was seamless for both their internal team and their customers — something that could be triggered with a single action and would handle everything from document preparation to legally valid digital signature collection and storage. The Solution We designed and implemented a fully automated contract signing workflow that integrates Dynamics 365 Sales, Microsoft Power Automate, SharePoint, and DocuSign. The solution covers the entire lifecycle of a contract — from generation to signing to archival. Key Components Dynamics 365 Sales HubCentral system for quote and customer management. Power AutomateOrchestration layer connecting Dynamics 365, SharePoint, and DocuSign. SharePointDocument storage for generated and signed contracts. DocuSignDigital signature platform for legally binding contract execution. How It Works — At a Glance The solution is driven by two connected Power Automate flows: Send Contract Flow — Triggered manually from the Dynamics 365 Quote record. Retrieves the contract document from SharePoint, creates a DocuSign envelope, adds the contract document and recipient, places signature/name/date tabs, and sends the envelope. Receive Signed Contract Flow — Triggered automatically when the DocuSign envelope is completed. Retrieves the signed PDF from DocuSign and saves it to the same SharePoint folder, linking it back to the quote for a complete audit trail. Implementation 1 Step 1 Generate the Contract from Dynamics 365 The process begins in the Dynamics 365 Sales Hub on an approved Quote record. The sales representative clicks the Create Contract button in the command bar. This action triggers a workflow that generates a Service Contract Word document using the quote data and saves it to a dedicated Contracts folder in SharePoint, organised under the Quote number. Once generated, a confirmation dialog appears prompting the user to Open Contract for review before sending. The contract document is auto-named with the Quote ID and a timestamp, ensuring version control and traceability. 2 Step 2 Send the Contract for Signing After reviewing the document, the representative clicks Send Contract from the same Quote record. This triggers the main Power Automate flow — To send Contract Document to Customer for DocuSign. The flow executes the following steps: Compose Quote ID — Extracts and formats the Quote identifier. Get document location related to quote — Uses a FetchXML query against the SharePoint Document Location entity in Dataverse to locate the correct SharePoint folder linked to the Quote. Get Quote, Get Customer, Get Contact — Retrieves the customer’s full name and email address from Dynamics 365 for use as the DocuSign recipient. Initialise variables — Sets up Envelope ID, Recipient ID, and Parent Site location for downstream use. Iterate and locate the contract file — Loops through the SharePoint document library, resolves parent locations, retrieves file content, properties, and metadata. Create DocuSign Envelope — Creates an envelope with the subject line ‘DocuSign: Review & Sign the Contract Document’ and a personalised email body addressed to the customer contact. Add Document to Envelope — Attaches the contract Word document (encoded as Base64) to the envelope as a DOCX file. Add Recipient — Adds the customer contact as a signer with their full name and email from Dynamics 365. Add Signature Tabs — Places signature & other fields expaected to be filled by the recipient on … Continue reading From Quote to Signed Contract in Minutes: Automating DocuSign Integration for an Australia-Based Commercial Laundry Services Company

Share Story :

How We Built a Real-Time Lightweight Financial Statement Reporting Experience Directly Inside D365 PO for a Texas-Based Cybersecurity Firm

How We Built a Real-Time Lightweight Financial Statement Reporting Experience Directly Inside Microsoft Dynamics 365 Project Operations Summary Designed and deployed a lightweight, real-time financial statement reporting solution directly inside Microsoft Dynamics 365 Project Operations for a Texas-based Cybersecurity & AI Business Solutions firm. Eliminated dependency on heavy paginated reporting and large-scale Power BI datasets for operational financial visibility. Built an interactive HTML + JavaScript reporting framework embedded natively within Dynamics 365 CRM. Enabled dynamic filtering, instant report rendering, and printable customer-ready statements directly from the CRM interface. Introduced popup-based full-screen report rendering for detailed review and print-ready output without leaving Dynamics 365. Integrated funding balances, allocations, transactions, installment schedules, and financial snapshots into a single operational reporting experience. Reduced reporting development complexity, minimized data transformation overhead, and improved scalability compared to traditional BI-heavy architectures. Created a highly maintainable reporting model that scales efficiently as operational datasets grow without introducing significant Power BI licensing or performance constraints. Table of Contents Introduction The Business Problem The Solution Architecture Real-Time CRM-Native Reporting Lightweight Front-End Reporting Framework Popup-Based Printable Report Experience Data Model and Reporting Components Design Principles Business Impact Why This Approach Worked FAQs Conclusion 1. Introduction As organizations scale, operational reporting often becomes increasingly difficult to maintain. For a Texas-based Cybersecurity & AI Business Solutions firm operating on Microsoft Dynamics 365 Project Operations, this challenge became especially visible in financial agreement tracking and customer funding visibility. The business already had access to reporting platforms such as Power BI and paginated reports. However, these approaches introduced several operational problems: Long development cycles Heavy data-cleaning requirements Complex transformation pipelines Delayed visibility into operational data Increasing licensing costs as datasets expanded Slow report rendering for operational users Dependency on external reporting infrastructure Instead of another external BI layer, the organization wanted a lightweight operational reporting experience directly inside Dynamics 365 CRM itself. The Goal: Build a real-time, CRM-native financial reporting experience that renders instantly, supports dynamic filtering, enables printing, and scales without heavy BI infrastructure. 2. The Business Problem The organization manages multiple long-running service agreements, funding allocations, installment schedules, and customer financial balances across cybersecurity services, managed services, and AI solution engagements. Operational users needed a consolidated statement experience that could answer questions such as: What is the customer’s current available balance? Which transactions impacted the balance during a selected period? Which allocations are currently active? How much funding has been consumed vs allocated? Which installments are pending, paid, or overdue? What does the latest funding snapshot look like? Can the report be reviewed and printed directly from CRM? Paginated Reporting Limitations Increasing query complexity Performance degradation with larger datasets Heavy formatting maintenance Limited interactivity Rigid deployment cycles Power BI Challenges Significant Power Query transformations Data-cleaning pipelines Incremental refresh considerations Dataset refresh latency Licensing growth with scale Overengineering for transactional operational reporting 3. The Solution Architecture The reporting framework was designed as a native Dynamics 365 embedded reporting experience using: HTML Web Resources JavaScript Dynamics 365 Web API Native CRM navigation APIs Real-time entity retrieval Popup-based print rendering Embedded Operational Report Apply filters Select funding records Choose reporting periods Generate statements instantly Navigate operational financial data Popup Print Report Detailed review Executive presentation Customer-facing statements Printing and PDF generation 4. Real-Time CRM-Native Reporting One of the most important architectural decisions was avoiding external data replication entirely. Instead of pushing transactional data into a separate reporting warehouse, the report retrieved data directly from Dynamics 365 using the native Web API. Real-time visibility Zero synchronization lag Reduced infrastructure complexity Lower maintenance overhead Faster deployment cycles Everything rendered on demand inside the CRM session itself. 5. Lightweight Front-End Reporting Framework The reporting experience was intentionally designed to behave more like a modern application than a traditional report. Dynamic Filter Bar Users could dynamically filter reports using: This Month Last Month This Quarter Current Year Custom Date Ranges Funding Status Funding Selection The report regenerated instantly without page reloads. Responsive Report Rendering The reporting layout dynamically populated: Account Summary Transaction Details Allocation Summary Installment Details Detailed Account Summary Each section rendered independently based on live API responses. Intelligent Empty-State Handling Instead of showing blank tables or errors, the framework displayed contextual empty-state messaging such as: “No transactions during this statement period” “No active allocations” “No installment details available” This significantly improved usability for operational teams. 6. Popup-Based Printable Report Experience A major requirement was enabling users to thoroughly review and print reports directly from CRM. To solve this, the solution introduced a dedicated popup rendering architecture. Users could click: “Expand Report” This launched a fullscreen popup using Dynamics 365 navigation APIs with: Large-format rendering Print-optimized layout Full customer statement formatting Multi-page support Consistent branding Printable tables Customer reference guides The popup approach delivered several advantages: Better readability Cleaner print formatting Improved executive review experience Isolation from CRM form clutter Easier PDF generation Most importantly, the popup still worked entirely against live CRM data. 7. Data Model and Reporting Components The report consolidated multiple operational areas into a single experience. Account Summary Provided a high-level balance overview including: Balance Forward Total Credits Total Debits Closing Balance This gave immediate visibility into customer financial standing. Transaction Details Displayed detailed running balance activity including: Document date Transaction description Service type Credits Debits Running balance Transactions dynamically recalculated balances during rendering. Allocation Summary Tracked funding allocation activity including: Allocated funds Consumed funds Remaining balance Allocation status Returned allocations were handled separately with custom date logic. Installment Tracking Displayed installment lifecycle visibility including: Invoice dates Due dates Payment dates Payment terms Installment status The report intelligently handled future-dated payments and pending statuses. Detailed Funding Snapshot Displayed operational funding metrics including: Starting Balance Contracted Funds Total Budgeted Funds Collected Funds Used Funding Available Funds Allocated Funds Unallocated Funds This created a complete operational funding overview within a single screen. 8. Design Principles Several architectural principles guided the solution. Real-Time Over Batch Processing Operational reporting should reflect current business activity immediately. The solution avoided overnight refresh cycles entirely. Lightweight Over Heavy BI Not … Continue reading How We Built a Real-Time Lightweight Financial Statement Reporting Experience Directly Inside D365 PO for a Texas-Based Cybersecurity Firm

Share Story :

Building a Controlled Booking-to-Time Entry Import Framework Inside Dynamics 365 Project Operations for Texas-Based Operational Security & Cybersecurity Firms

Building a Controlled Booking-to-Time Entry Import Framework Inside Dynamics 365 Project Operations Summary Two Texas-based firms — one in Cybersecurity, another in Operational Security — required a streamlined and controlled Time Entry (TE) creation process inside Dynamics 365 Project Operations. Native D365 Project Operations limitations around Project Task visibility, booking-driven TE creation, and inconsistent resource submissions created operational inefficiencies. A fully customized solution was implemented directly inside Dynamics 365 CRM using HTML Web Resources, JavaScript, Dataverse Web API, Ribbon Enable Rules, and custom plugins. The solution centralized TE creation under Project Managers and Project Approvers, enabling controlled and secure booking-based TE management. A custom booking import framework dynamically surfaced only authorized projects and resources based on Project Approver relationships. Custom plugin logic and Resource Assignment–based task resolution automated Project Task mapping for accurate Time Entry creation. Key capabilities delivered included controlled booking imports, role-based visibility, automated task association, external comments support, and bulk TE creation. Dynamic filtering ensured Project Managers could only access resources and bookings associated with projects they were authorized to manage. The entire experience operated natively inside Dynamics 365 Project Operations without external portals, Power Apps screens, or third-party applications. The implementation reduced manual effort, improved TE submission reliability, increased operational flexibility, and enabled more accurate tracking of actual project work. Table of Contents Introduction The Business Problem & Pain Points The Solution Architecture Implementation Design Principles Business Impact Why This Approach Worked FAQs Conclusion 1 Introduction Two Texas-based firms operating in the Cybersecurity and Operational Security space relied heavily on Dynamics 365 Project Operations for project delivery tracking, resource management, and operational execution. As project operations scaled, Project Managers and Project Approvers required a faster and more controlled mechanism for creating Time Entries (TEs) directly from resource bookings. The organizations needed a solution that could simplify booking imports, improve Project Task mapping, enforce role-based visibility, and reduce the dependency on individual resources for manual TE submissions. Operationally, Project Managers were often responsible for validating and entering actual work performed, making the standard TE process inefficient and time-consuming. Key Challenges Standard Dynamics 365 Project Operations behavior did not fully support project-task-aware Time Entry creation from bookings. Project Task values were not consistently available across Resource Requirements and bookings in several PO environments. Resource-driven TE submission resulted in inconsistent and delayed operational reporting. Project Managers lacked centralized visibility and controlled access to resource bookings across approved projects. Native booking import and TE creation workflows lacked flexibility for operational governance and scalability. Goals of the Solution Centralize Time Entry creation under Project Managers and Project Approvers. Enable controlled booking imports with role-based project visibility. Automate Project Task association during TE creation. Allow bulk creation of booking-driven Time Entries directly inside CRM. Improve operational accuracy, flexibility, and governance without relying on external applications or custom portals. 2 The Business Problem & Pain Points 1. Native Booking-to-Time Entry Limitations Standard Dynamics 365 Project Operations behavior did not consistently expose Project Task information through Resource Requirements and Bookings. This created gaps in task-aware Time Entry creation and forced users to manually reconstruct operational context during the TE process. 2. Lack of Controlled Booking Visibility Default system behavior provided broader booking visibility than operationally required. The organizations needed a controlled access model where only designated Project Managers and Project Approvers could view and manage booking imports for authorized projects. 3. High Manual Effort in Time Entry Creation Project Managers and operational teams spent significant time manually entering project references, tasks, durations, and external comments for each Time Entry. This increased administrative overhead and reduced operational efficiency. 4. Inconsistent Resource-Driven Submission Process The organizations faced reliability challenges with resource-submitted Time Entries, leading to delays, missing entries, and inconsistencies in operational reporting. Project Managers required centralized ownership over TE creation to ensure accurate work tracking. 5. Fragmented User Experience Users were required to navigate across multiple Dynamics 365 screens and entities to complete routine booking import and Time Entry operations, making the process cumbersome and inefficient for daily operational usage. 6. Scalability and Maintainability Concerns The firms required a lightweight and scalable solution that could operate natively within Dynamics 365 Project Operations without introducing unnecessary Power Apps layers, external portals, or high-maintenance custom applications. 3 The Solution Architecture Architecture Diagram and Flow Figure: Complete Frontend – Backend behaviour of the TE Automation Module. Dynamics 365 Ribbon Workbench A custom “Import Resource Bookings” ribbon action was introduced to provide controlled access to the booking import process only for authorized Project Managers and Project Approvers. JavaScript + Dataverse Web API JavaScript and Dataverse Web API were used to handle dynamic project filtering, approver validation, booking retrieval, task mapping, and automated Time Entry creation directly inside CRM. HTML Web Resources Two custom HTML-based interfaces were developed: Resource Selection Interface — controlled resource visibility and selection Booking Import & TE Creation Interface — booking imports, task selection, external comments, and bulk Time Entry creation Dataverse Plugin Layer A lightweight custom C# plugin was implemented to support Project Task resolution, task validation, and booking-to-Time Entry automation scenarios not fully supported natively in Dynamics 365 Project Operations. Dataverse Entities Involved The solution leveraged multiple Project Operations entities: msdyn_project msdyn_projectteam msdyn_resourceassignment msdyn_projecttask bookableresource msdyn_resourcerequirement bookableresourcebooking msdyn_timeentry Together, these entities enabled secure, project-aware, and task-aware operational workflows directly inside Dynamics 365 CRM. Entity Relationships Figure: Relationships and associations of the involved entities. 4 Implementation 1. Role-Controlled Ribbon Visibility A custom ribbon action was implemented to ensure only authorized Project Managers and Project Approvers could access the booking import functionality. Visibility was dynamically controlled based on project approval relationships inside Dynamics 365. Figure: Case 1: When Logged in as a Project Approver/Manager. Figure: Case 2: When NOT Logged in as a Project Approver/Manager. 2. Resource Selection Experience A custom resource selection interface was developed to display only eligible resources associated with projects managed by the logged-in approver. This provided secure and simplified operational visibility. Figure: Bookable Resource Selection from a list of Active Bookable Resources, which are under any Project, where the current … Continue reading Building a Controlled Booking-to-Time Entry Import Framework Inside Dynamics 365 Project Operations for Texas-Based Operational Security & Cybersecurity Firms

Share Story :

Transforming Return Logistics for a USA Manufacturer: Automating Shipment Processing with Dynamics 365 Customer Service

Summary This blog highlights the integration of Microsoft Dynamics 365 Customer Service Hub with FedEx Shipping Manager to handle automated email return shipments for a consumer electronic appliances company based in Massachusetts, USA. In the original process, customer service representatives were required to manually register each return shipment through the FedEx Shipping Manager portal. This process involved copying customer details, creating shipments, generating labels, and capturing tracking numbers — a workflow that typically required 20–30 minutes per request. The integration project automated the entire return shipment process directly within the Dynamics 365 Customer Service Hub. With a single click, the system now registers the shipment using FedEx Shipment APIs, generates a return label, captures the tracking number, and updates the case record automatically. This innovation eliminated the need for agents to switch between systems and reduced shipment registration time from 20–30 minutes to just a few seconds, significantly improving operational efficiency and the overall customer service experience. This blog explains: 1] The operational challenges caused by manual shipment registration. 2] How Dynamics 365 Customer Service Hub was integrated with FedEx Shipping Manager. 3] The functional workflow used to automate shipment creation. 4] How customer service representatives trigger shipments directly from CRM. 5] The business impact achieved through automation and system integration. Table of Contents 1. Customer Scenario 2. Solution Overview 3. Functional Implementation Approach 4. Email Return Label Experience 5. Handling Complex Data Automatically 6. Business Impact 7. Preview Video 8. Final Thoughts Customer Scenario A Massachusetts-based consumer appliance manufacturer known for building innovative kitchen technology was experiencing a growing operational challenge in its customer service operations. As demand for its products increased across major retail channels, the number of customer support cases related to product returns and replacements also grew significantly. The company’s customer support team handled all service requests through Microsoft Dynamics 365 Customer Service. However, when a product needed to be returned for inspection, replacement, or warranty evaluation, agents were required to manually create a shipment in FedEx Ship Manager. This manual process involved several steps: 1] Opening the customer case in the CRM system 2] Copying customer information and shipping details 3] Logging into the FedEx portal 4] Registering the shipment manually 5] Generating a return label 6] Capturing the tracking number 7] Returning to CRM to update the case Each shipment registration typically took 20–30 minutes. When hundreds of return requests were processed weekly, this created several operational challenges: 1] Agents constantly switched between multiple systems 2] Manual data entry increased the risk of errors 3] Customer response times increased, leading to customer resentment 4] Tracking information was not always immediately available in the case record The organization needed a more efficient way to handle returns while keeping the entire process inside their CRM platform. Solution Overview To streamline the returns process, I implemented an integration between Microsoft Dynamics 365 Customer Service and FedEx shipping manager services. The goal was simple: Allow customer service representatives to generate a return shipment directly from the case record with a single click. Instead of navigating to the separate external shipping portal, agents can now initiate a return shipment directly from the CRM case page. Once triggered, the system automatically handles the entire shipment (Email/Return/Label) registration process. With this solution in place, the workflow now looks like this: A customer contacts support regarding a product return via their website, which registers an associated Case record in D365 Case Management (via existing case automation). The support agent opens the case in Dynamics 365. A “Create Return Shipment” button becomes available when the case meets the required conditions, e.g., Case Stage, RMA availability, Region of Customer, etc., thus validating and restricting shipment privileges. With one click, the system registers the shipment with FedEx (via appropriate FedEx Shipment APIs, as per customer requirements). The shipment tracking number is automatically captured and stored in the case record. This tracking number is useful for the customer support team as well as the customer to check the progress of the shipment on the FedEx Shipping Manager portal. The customer receives an email return label that they can print and attach to their package. FedEx Email Return Shipment Process Flow This transformation reduced a 20–30 minute process to just a few seconds. Functional Implementation Approach The implementation focused on simplifying the experience for customer service agents while maintaining strict control over when and how shipments could be created. Intelligent Shipment Trigger Visibility Within the CRM case interface, the return shipment button appears only when specific conditions are met. This ensures that shipments are created only for valid return scenarios. Examples of conditions include: The case must have an approved return authorization The case must be in an appropriate service stage The customer address must be eligible for shipment Required customer information must be available Example: Return Shipment Trigger inside Dynamics 365 Customer Service Hub By embedding these conditions into the CRM interface, agents are guided through the correct service workflow without needing to remember complex procedures. Automated Shipment Creation Once the button is clicked, the system automatically gathers key information from the case record, such as: Customer details Shipping address Product description Return authorization number Contact phone number This information is then used to register the shipment through the FedEx shipping system. The system generates: A unique shipment tracking number A return shipment registration A digital return label The warehouse where the shipment would reach based on the product and end consumer requirement – e.g., return, replacement, or repair of the product Example: A Successful Return Shipment to a specific warehouse. Example: Tracking a Return Shipment using the Tracking No. updated on D365 Customer Service Hub. Example: The FedEx Shipping Manager for Tracking the Integrated Shipments. The tracking number is immediately written back to the case record in Microsoft Dynamics 365 Customer Service, ensuring that support agents can track the return shipment without leaving the case. Email Return Label Experience After the shipment is registered, the customer automatically receives an email containing their return label. … Continue reading Transforming Return Logistics for a USA Manufacturer: Automating Shipment Processing with Dynamics 365 Customer Service

Share Story :

Browser-Level State Retention in Dynamics 365 CRM: Improving Performance & UX with Session Storage

Dynamics 365 model-driven apps are excellent at storing business data, but not every piece of information belongs in Dataverse. A common design folly is using Dataverse fields to store temporary UI state-things like selected views, filters, or user navigation preferences. While this works technically, it introduces unnecessary performance overhead and can create incorrect behavior in multi-user environments. In this blog, I’ll focus on browser-level retention of CRM UI data using “sessionStorage“, using subgrid view retention as a practical example for a technology consulting and cybersecurity services firm based in Houston, Texas, USA, specializing in modern digital transformation and enterprise security solutions. The Real Problem: UI State vs Business Data Let’s separate concerns clearly: Type Example Where it should live Business data Status, owner, amounts Dataverse UI state Selected view, filter, scroll position Browser Subgrid views fall squarely into the UI state category. Scenario: Subgrid View Resetting on Navigation Users reported the following behavior: This breaks user workflow, especially for records that users revisit frequently. Possible Solution: Persisting UI State in Dataverse (Original Approach) This would attempt to fix it by storing the selected subgrid view GUID in a Dataverse field on the parent record. How It Works Why this might look reasonable The Hidden Problems 1] Slower Form Execution 2] Data Model Pollution 3] Incorrect Multi-User Behavior 4] Scalability Issues In short, Dataverse was doing work it should never have been asked to do. Workaround to this Approach: Keep UI State in the Browser for that session, But practically: The selected subgrid view belongs to the user’s session, not the record. Once that boundary is respected, the solution becomes much cleaner. Practical Solution: Browser Session Storage (Improved Approach) Instead of persisting view selection in Dataverse, we store it locally in the browser using sessionStorage. sessionStorage is part of the Web Storage API, which provides a way to store key-value pairs in a web browser. Unlike localStorage, which persists data even after the browser is closed, sessionStorage is designed to store data only for the duration of a single session. This means that the data is available as long as the tab or window is open, and it is cleared when the tab or window is closed. Why Session Storage? How the Improved Solution Works 1. Store the View Locally on Subgrid Change 2. Restore the View on Form/Grid Load This ensures that when the user revisits the form, the subgrid opens exactly where they left off. Why This Approach Is Superior 1] Faster Execution 2] Correct User Experience 3] Clean Architecture 4] Zero Backend Impact When to Use Browser-Level Retention Use this pattern when: Examples: To conclude, not all data deserves to live in Dataverse. When you store UI state in the browser instead of the database, you gain: Subgrid view retention is just one example-but the principle applies broadly across Dynamics 365 customizations. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com

Share Story :

Seamlessly Switching Lead-Based BPFs After Qualification in Dynamics 365 CRM

In Microsoft Dynamics 365 CRM, Business Process Flows (BPFs) are powerful tools that guide users through defined business stages. However, when working with Lead-based BPFs that persist into Opportunity, certain platform limitations surface-especially when multiple Lead-rooted BPFs are involved. This blog walks through a real-world challenge I encountered while working with a Houston-based technology consulting and cybersecurity services firm. The firm specializes in modern digital transformation and enterprise security solutions. I explore issues with Lead → Opportunity Business Process Flow (BPF) switching, explain why the out-of-the-box behavior falls short, and detail how I designed a robust client-side and server-side solution to safely and reliably switch BPFs-even after a Lead has already been qualified. How BPFs Work (Quick Recap) It ideally won’t allow a switch, either via brute forcing via client side or server side as – The Problem In my scenario: The Challenge Once a Lead is qualified: This is non-intuitive, error-prone, and inefficient, especially considering the manual effort that goes into it. Solution Overview I implemented a guided, safe, and reversible BPF switching mechanism that: High-Level Architecture This solution uses: Step-by-Step Methodology 1. Entry Point: Opportunity Ribbon Button A custom ribbon button on the Opportunity form: These fields act as a controlled handshake between Opportunity and Lead. 2. Lead OnLoad: Controlled Trigger Execution On Lead form load: if (diffSeconds > 20) { return;} Xrm.WebApi.updateRecord(“lead”, formContext.data.entity.getId(), { cf_shouldtrigger: false}); This ensures: 3. Identifying and Aborting the Existing BPF Before switching: var activeProcess = formContext.data.process.getActiveProcess(); Xrm.WebApi.updateRecord(bpfEntityName,result.entities[0].businessprocessflowinstanceid,{statecode: 1, // Inactivestatuscode: 3 // Aborted}); This is a critical step—without aborting the old instance, Dynamics can behave unpredictably. 4. Switching the UI BPF After aborting: 5. Handling BPF Instance Creation (First-Time Switch Logic) The solution explicitly checks: If it exists: If it does NOT exist (first switch): This dual-path logic makes the solution idempotent and reusable. 6. Server-Side Plugin: Persisting the Truth A plugin ensures that: // Identify BPF typebool isNewBpf = (context.PrimaryEntityName == “new_bpf_entity”); // Resolve related LeadGuid leadId = isNewBpf? ((EntityReference)target[“bpf_leadid”]).Id: ((EntityReference)target[“leadid”]).Id; // Retrieve related Opportunity via LeadEntity opportunity = GetOpportunityByLead(service, leadId); // Determine stages and pathstring qualifyStageId = isNewBpf ? NEW_QUALIFY_STAGE : OLD_QUALIFY_STAGE;string finalStageId = isNewBpf ? NEW_FINAL_STAGE : OLD_FINAL_STAGE;string traversedPath =START_STAGE + “,” + qualifyStageId + “,” + finalStageId; // PATCH 1 – Qualify stageservice.Update(new Entity(target.LogicalName, target.Id){[“activestageid”] = new EntityReference(“processstage”, new Guid(qualifyStageId)),[“traversedpath”] = START_STAGE + “,” + qualifyStageId}); // PATCH 2 – Final stage + Opportunity bindservice.Update(new Entity(target.LogicalName, target.Id){[“activestageid”] = new EntityReference(“processstage”, new Guid(finalStageId)),[“traversedpath”] = traversedPath,[isNewBpf ? “bpf_opportunityid” : “opportunityid”] =new EntityReference(“opportunity”, opportunity.Id)}); // Mark Lead as successfully processedservice.Update(new Entity(“lead”, leadId){[“cf_pluginsuccess”] = new OptionSetValue(1) // Yes}); This guarantees data consistency and auditability. 7. Final UI Sync & Redirect After successful completion:   Xrm.Navigation.openForm({ entityName: “opportunity”, entityId: opportunityId }); From the user’s perspective: “I clicked a button, confirmed the switch, and landed back in my Opportunity—done.” Why This Solution Works ✔ Respects Dynamics 365 BPF constraints✔ Prevents orphaned or conflicting BPF instances✔ Handles first-time and repeat switches✔ Ensures server-side persistence✔ Minimal user disruption✔ Fully reversible Most importantly, it bridges the gap between platform limitations and real business needs. Dynamics 365 BPFs are powerful-but when multiple Lead-rooted processes coexist, manual switching is not enough. This solution demonstrates how: can be combined to deliver a seamless, enterprise-grade experience without unsupported hacks. If you’re facing similar challenges with Lead → Opportunity BPF transitions, this pattern can be adapted and reused with confidence. We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com

Share Story :

Filtering Dynamics 365 Subgrids Without Relationships: A JavaScript-Only Approach Using setFilterXml

In Microsoft Dynamics 365, subgrids are a powerful way to display related records on a form. But what happens when: Out-of-the-box, Dynamics 365 doesn’t give us many options here. We can select a view, but we cannot apply dynamic filters unless the entities are directly related or the criteria already exist in the view’s FetchXML. This is where the JavaScript setFilterXml() API becomes a life-saver. In this article, I’ll show you how to filter a subgrid dynamically using JavaScript — even when the subgrid’s entity is completely unrelated to the main form entity. Use Case Imagine your form has a field called Name, and you want to filter the subgrid so that it shows only records whose Name begins with the same prefix. But: As there are also records, where the lookup column might need to be empty on purpose, which further would break relationship based filtering in the subgrid. OOB? Impossible. With JavaScript? Totally doable. How the JS based subgrid filtering works In Dynamics 365, subgrids are rendered as independent UI components inside the form. Even though the form loads first, subgrids load asynchronously in the background, which means: The form and its fields may already be available, but the subgrid control might not yet exist, so trying to apply a filter immediately on form load will fail. Here is the basic structure of a JS Function to perform Subgrid filtering – This control represents the interactive UI component that displays the records for the view.It gives you programmatic access to:-> Set filters-> Refresh the grid-> Access its view ID-> Handle events (in some versions) However, because subgrids load later than the form, this line may return null the first several times. If you proceed at that point, your script will break.So we implement a retry pattern: If the subgrid is not ready, wait 100ms -> Try again -> Repeat until the control becomes availableThis guarantees that our next steps run only when the subgrid is fully loaded. var oAnnualTCVTargetGridFilter = oAnnualTCVTargetGridFilter || {}; oAnnualTCVTargetGridFilter.filterSubgrid = function(executionContext) {var formContext = executionContext.getFormContext(); }; To make sure the filter is applied correctly, we follow a three-step workflow: 1. Retry Until the Subgrid Control Is Loaded (setTimeout) – When the script runs, we attempt to retrieve the subgrid control using: var subgrid = formContext.getControl(“tcvtargets”); 2. Apply the Filter (setFilterXml()) – Once the subgrid control is found, we can safely apply a filter. Then we can apply our filtering logic, and utilize it in the FetchXML Query: -> Read the field Name (cf_name) from the main form & design a logic -> Construct a FetchXML <filter> element -> Passing this XML to the subgrid using: This tells Dynamics 365 to apply an additional filter on top of the existing view used by the subgrid. A few important things to note: If the cf_name field is empty, we instead apply a special filter that returns no rows. This ensures the grid displays only relevant and context-driven data. 3. Refresh the Subgrid (subgrid.refresh()) – After applying the filter XML, the subgrid must be refreshed: Without this call, Dynamics will not re-run the query, meaning your filter won’t take effect until the user manually refreshes the subgrid. Refreshing forces the system to: -> Re-query data using the combined view FetchXML + your custom filter -> Re-render the grid -> Display the filtered results immediately This gives the user a seamless, dynamic experience where the subgrid shows exactly the records that match the context. JS + FetchXML based filtering in action – Without filtering :- With filtering :- Key Advantages of This Approach Works Even When No Relationship Exists Possibility to filter a subgrid even if the target entity has no direct link to the form’s main entity. This is extremely useful in cases where the relationship must remain optional or intentionally unpopulated. Enables Dynamic, Contextual Filtering We can design filtering logic on the form field values, user selections, or business rules. Filtering on Fields Not Included in the View Since the filtering logic is applied client-side, there is no need to modify or clone the system view just to include filterable fields. Bypasses Limitations of Lookup-Based Relation Filtering This method works even when the lookup column is intentionally left empty, which is a scenario where OOB relationship-based filtering fails. More Flexible Than Traditional View Editing You can apply advanced logic such as prefix matching, conditional filters, or dynamic ranges—things not possible using standard UI-only configuration. To conclude, filtering subgrids dynamically in Dynamics 365 is not something the platform supports out-of-the-box- especially when the entities are unrelated or when the filter criteria doesn’t exist in the subgrid’s original view. However, with a small amount of JavaScript and the setFilterXml() API, you gain complete control over what data appears inside a sub grid, purely based on the context passed from the main form. I Hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudFronts.com.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Categories

Secured By miniOrange