web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :

How to Build AI-Generated Charts and PDFs in Dynamics 365 Using a PCF Control

Inogic Profile Picture Inogic 1,291 Moderator

We spend a lot of time working inside Dynamics 365 CRM forms. Accounts, Opportunities, Cases and other commonly used entities. One area that always had room for improvement was how data gets presented within those forms. For example, if a sales manager wants to see the pipeline breakdown for a specific Account, they typically have to switch to a dashboard or open Power BI. If they need a sales proposal for an Opportunity, it has to be created manually outside the record. All of this happens outside the context of the record they are already working in.

This led us to explore better approaches, and that is when we came across the Code Interpreter PCF control. The idea was simple: the form itself could generate that content on the fly. Not a static chart, not a pre-built template, but something that pulls live CRM data, reasons over it, and renders the output right there inside the form. We tested this across two scenarios: an interactive Opportunity Pipeline chart on the Account form, and an AI-generated Sales Proposal PDF on the Opportunity form. This blog walks through both scenarios end to end.

What Is the Code Interpreter in the Power Platform Context?

Before moving forward with the build, it is worth clarifying what ‘Code Interpreter’ means here, as the term is often used loosely.

In the Power Platform world, Code Interpreter is a capability that can be enabled on prompts created through AI Hub or Copilot Studio. When enabled, it allows the prompt to dynamically generate and run Python code on the server side for tasks like data analysis, chart generation, and document creation. Depending on what the Python code produces, the prompt can return either text, such as raw HTML, or files like PDFs or Word documents.

What Microsoft released as a sample is a PCF (Power Apps Component Framework) field control that acts as the front-end consumer of those prompts. It sits on a Model-Driven App form, calls the Dataverse Predict API against the configured prompt, and renders the response, whether that is an interactive HTML chart or a downloadable PDF... Read More

Comments