Setting up Codex with Power Platform MCP Server

Amongst available AI clients available, Codex is well-known by ChatGPT and here’s how you can use to configure with Power Platform MCP Server.

Install Codex on VS Code

One of the first things to do is to install Codex as an extension in Visual Studio Code –

  1. Look for the below extension and you should see a ChatGPT icon.

  2. Once this is installed, go to Extensions and you can sign in with your GitHub Pro account.

  3. It’ll open up a Sign-in page and you’ll need to enter your credentials.

  4. Make sure you open a Folder in VS Code and also ensure npm is installed by running this command in terminal ‘npm -v‘.


  5. Next, before you configure the TOML file – make sure you are having powerplatform-mcp installed locally and then configure the TOML file for Codex.

Downloading Power Platform MCP locally and connecting to the MCP

Now that Codex is installed and NPM is installed as well. Let’s first download Power Platform MCP first and then connect it to the Power Platform MCP environment –

  1. Let’s check if PowerPlatform-MCP is already installed or not by checking its version number.
    Below, it says that it didn’t find zsh, means powerplatform-mcp is not installed locally.

  2. Because I use a Mac, I can do so using Homebrew. You can check alternatively on doing this using Windows and downloading using Powershell.
    In case you face permission issues on the device, you can just run the below command –
    sudo npm install -g powerplatform-mcp” and you should see the packages getting downloaded successfully.

  3. Now, go ahead and configure the Toml file.

  4. Then, in the TOML file, you can enter the configuration like so –

  5. And when you try to query in Codex, you’ll see the results come through in the form of answers.

Hope this was useful!

Thank you!

Time Entry Calendar in Project Operations

If you have been used to doing Time Entries daily on the classic Time Entry grid and that has been a habit for quite some time, you might not realize that it is slower and inefficient to do, just because you got used to it now.
So, here’s Time Entry calendar view which is better way to visualize and do Time Entries! This is in Preview as of the day of writing this post.

Enable Time Entry Calendar View

Here’s how you can turn on your Time Entry Calendar from Project Operations’ Settings

  1. Navigate to Settings Area in Project Operations Model-Driven app.


  2. Then drop down form Features to find the Time Entry Calendar listed.


  3. Click on it to turn it on. It’ll ask for confirmation, it ask describes what it does.


How Time Entry Calendar works?

Here’s how Time Entry Calendar feature works when you want to do Time Entries.

  1. Now when you navigate to the Time Entries from My Work (or wherever you have put it), you’ll see this new option in My Work called as Time Entry Calendar, while you existing Time Entry section still exists as is.

  2. When it loads, you can see the Time Entries now appear like how allocations appear on your Schedule Board, gives you a better way to visualize Time Entries to be done and and most importantly, select the Time for the Time Entry.
    You can visualize Daily, Weekly and Monthly.


  3. You can even click on the Time you want to make Time Entry on and the window pane will let you drill down to the Task level on the Project which you want to make Time Entry on.

Hope this was useful!

Thank you!

Project Task Progress Update in Project Operations & Mark Task as Completed

Up until now, you had to do Time Entries to mark a Project Task as completed. But, this makes difficult to gauge the progress of the project in actuality as some tasks might need to be marked as completed without having to do remaining Time Entries on them.

Here’s when marking Project Task as Completed comes in handy.

Default Behavior for Project Tasks in Project Operations

By default, you won’t be able to edit the % of the task in the Project Task Grid –

  1. Till now, you are able to directly mark a Task as complete by using the below option –

  2. And it’ll mark the task as Completed to 100%. But, when hover over the % completed, it’ll say that it’s a read-only and can’t be edited to put your custom % in there.

  3. So, let’s see how this feature will let you edit the % complete to your desired number.

Enable marking Project Tasks as completed

In Project Parameters, you can find the Feature to mark Project Task as completed –

  1. Drop down on the Feature Control and you’ll see that Task C

Mark Project Tasks as completed

When you enable this, you’ll see the below on the Project –

  1. The Project form will have the field to allow Project Tasks to have custom progress % option.

  2. Once you do this, you’ll then be able to hover over the Project Task and enter the % you desire.

Hope this was useful!

Thank you!

Recycle Bin in Dynamics 365 CRM | [Preview]

Now, you can retrieve deleted records up to 30 days in Dynamics 365 CRM /. CE apps.
Here’s how you turn this feature on!

Enable Recycle Bin

Here’s how you can enable this given you have the correct Dynamics 365 System Administrator privileges –

  1. Go to the Environment’s Settings in Power Platform Admin Center (https://admin.powerplatform.microsoft.com/)

  2. Now, expand Product section and go to the Features option.

  3. When you scroll to the bottom, you’ll see Recycle Bin option as a feature. At the time of this blog post, the feature is in Preview – Hence, this is not recommended for production purposes yet.
    By default, it’s turned Off.

  4. Once you flick the switch, you’ll be asked for number of days the data has to be retained for. I’ll enter 30 here and then scroll to the bottom and save the setting.

  5. Once saved, you can go to your environment and test this on a sample record. See the section next.

Deleted Records

Now, since this is enabled and post that when you delete records, here’s how you can find them for the number of days you’ve configured Recycle Bin for –

  1. For example, this is the Account record you want to delete.

  2. Go to the View Deleted Records section in the in your environment’s Settings area.

  3. You’ll see the Deleted records which you can select and choose to Restore.


  4. Confirm.

  5. Upon Restoring, they’ll appear where they were originally supposed to exist.


    Because this feature is still in Preview, here’s Microsoft’s Documentation on the same with listing of some known issues as well – https://learn.microsoft.com/en-gb/power-platform/admin/restore-deleted-table-records?WT.mc_id=DX-MVP-5003911

Hope this was useful!

Thank you!

Create a Custom Connector For Power Automate & Power Apps

One of the most important qualities of extending capabilities of any platform is being able to add Custom code and make it available to wider use cases.

In this case, it’s a custom code that is encompassed in a Custom Connector in Power Platform and made available to Power Automate or Power Platform.

Use Case

The purpose of my custom connector is to call my hosted custom code in Power Automate or Power Apps.

For this example, I’ve created a simple Azure Function that just returns a value – just to test the working of the Custom Connector. Of course, your use case is to be able to connect to the hosted app, expect it to process the business logic which you intend to do and return back the results.
So, in my case – my Azure Function will simply greet the name passed to it.


See the Postman test below –

Now, let’s make a Custom Connector that will execute this Azure Function in your Power Automate.

Create Custom Connector in Power Apps / Power Automate

You can either make the Custom Connector from the Power Automate portal or the Power Apps Maker portal, both are the same things. Let’s see this example from Power Apps portal –

  1. In this use case, I’m in a Solution in Power Apps / Power Automate. Open the one in your case since you can’t create a Custom Connector from outside a Solution any longer.

  2. Now you can drop down from New and see in Automation menu that you can create a Custom Connector

  3. Now, you’ll be required to enter the name of the Connector itself and other details like a PNG icon for it, Description etc.

  4. Now, below is the info that I filled in. I’m calling it Data Transporter and have selected an Icon which should make me easy to recognize my connector in Power Automate and Power Apps and enter enter the details of my hosted Azure Function which is authenticated using an API Key.
    So, here’s what my info looks like –

  5. Now, when I click on Security after filling all the info, the type of Authentication I used in this case if API Key, yours could be different depending on what your custom application is configured to work with –

  6. It’ll ask you to fill in the information so that it appears as parameters to fill in for the Custom Connector when the end user will work on their Flows/Apps.

  7. The info I’m choosing to fill is this – I’m giving a name to the parameter to indicate what info is required. The actual parameter name required by the Azure Function, in this case – it’s ‘code’ and since I need to pass the API key in Query string, I’ve selected Query instead of Header.

  8. When you go to the next part, i.e. Definition, make sure you also give a Name to the Custom Connector already. Before your lose the info you’ve already entered. Make sure you also click on Create Connector


    Once you click on Create connector, it’ll create it in a few moments.

  9. Now, since you are aware of Triggers and Actions from using Power Automate – in this use case, my Custom Connector is designed to be an Action i.e. when called/used in Power Automate, it’ll simply perform the operation it’s designed to do.
    Hence, I’m selecting an Action here.
    When I select New Action from the left hand pane, it’ll open up information for me to fill out to describe the Action.

  10. Now, since this will appear as a listed item in Actions in my Power Automate connector, I’m filling in this info (and we can check later how it appears).


    Next, I’ll click on + Import from sample as it’ll give me a place to enter a sample for the request to call my hosted Azure Function.



  11. Next, I’ll pass these values as I did in Postman to create the sample. Once done, I can click on Import.

  12. When I import, I’ll the request parameters set in the Custom Connector based on the sample I entered.

  13. Next, I’ll scroll down to ensure that all validations are perfect and I needn’t fix anything.

  14. Next, I’ll skip AI Plugins step and also the Code step since I want to keep this example concise and to the scope of the hosted Azure Function only.


    And this is skipped too –

  15. Now, the final step is to Test the Custom Connector. The Editor will ask you to Update connector before you can Test. Then, in order to begin testing – you’ll need to first create a Connection using New Connection button as shown below.


  16. When you click on New Connection, you’ll be taken to a new tab to enter the API key which you created as parameter in the initial setup of this Connector. See #7 above. Enter the API key you have which works for this hosted app and then click Create connection.


  17. Next, in case the Connection doesn’t appear, click Refresh button once.

  18. Once you refresh, you should see your Connection come up and selected.

  19. Now, next step is to test the Custom Connector itself. Enter the values that you wish to test for and click Test operation.

  20. You’ll see the test results based on what the hosted code is supposed to perform.
    In my case, it was easy as it just greets the name entered.


    And your Custom Connector is now ready to be used!

Consuming Custom Connector

Now, let’s see how you can use the Customer Connector in Power Automate in order to perform the operation in your Flows –

  1. Once in Power Automate, look for the Custom tab in the Action selector.

  2. Then, you can see the Action you defined in your Connector Definition steps above.

  3. Since you need to authenticate using the API key you have, the create Connection step will ask you this info and you can give the name of the Connection.

  4. Pass the value you want to pass as data.

  5. Finally, you can just save and test the Flow itself and look for your Outputs.


    And that’s how you can have a Custom Connector for your custom app/service your have created. I’ll soon write about other aspects of Custom Connector which I wasn’t able to cover in this blog.

Hope this was useful!

Thank you!

Create your first custom Copilot for Customer Service Hub – Part 2 | Authentication

Now, you must have created your own Copilot to be deployed for the Customer Service Hub. If not, here’s the link to Part 1 of this blog – Create your first custom Copilot for Customer Service Hub – Part 1

Configure User Authentication with Microsoft Entra ID

Here’s how you can configure the User Authentication with Microsoft’s Entra ID for your Copilot to be authenticated with –

  1. Go to the Azure Portal [https://portal.azure.com/], then given the appropriate permissions your might have, you should be able to create an App Registration

  2. Now, create on New Registration –

  3. Now, give it a suitable name so that you can identify that the purpose of this App Registration is for Copilot. Select multi-tenant, leave Redirect URI blank and click on Register.

  4. Once ready, go to Authentication and then click to add Platform.


  5. In the platform selection, click on Web.

  6. Now, enter the URIs – First, enter the first URI, make sure to select Access tokens and ID tokens in Implicit grant and hybrid flows section and then click Configure.

    https://token.botframework.com/.auth/web/redirect
    https://europe.token.botframework.com/.auth/web/redirect



  7. Then, go ahead and add the Second URI from the main screen itself. Then, click Save and refresh the page once.

  8. Now that both the URIs are added, click on the configuration link to consider both the links for configuration.

  9. Now, you’ll be taken to this pane where you can click

  10. Now, both the URIs will appear here.

  11. Next, generate Client ID and Client Secret as you’ll need these details too –


Set Copilot Authentication to use Custom Authentication

Going back to the Copilot itself, set the Authentication you just created in the Azure Portal –

  1. Go to Settings on the Copilot to use the Custom Authentication.

  2. Go to Security section and then select Authentication.

  3. Select Authenticate manually and then enter the details as shown below. Enter the Client ID and Secret which you must’ve saved before.



  4. Next, come back to Copilot Settings and in Security, go to Settings and then look for Web channel security.

  5. Once you open it, you’ll find that the Secured Access is disabled. Go ahead and enable it.
    It takes up to 2 hours for it to take effect. Till then, old settings apply.

  6. Finally, in Channels, select Customer Service Hub so that you can connect to the Customer Service Hub.

  7. On the right hand side pane which opens up, you’ll see that this is not connected. Click the Connect button.


  8. It connects to Customer Service Omnichannel in a few moments.


Part 1: Create your first custom Copilot for Customer Service Hub – Part 1

Hope this was useful!

Thank you!

Lock fields on Editable Grid using JavaScript in Dynamics 365 CRM

At times, you use Editable Grid and by default – all the fields which are editable by the system are exposed and can be edited if they are present on the Editable Sub-grid. You might not want to allow all fields to be editable on the Editable Grid – so here’s how you can lock selected fields on the Editable Grid using JavaScript.

Use Case

Let’s look at the below example where by default, the fields are Editable because you are using an Editable Grid –

  1. You might want to lock the Status field since it shouldn’t be something end user should be able to change by themselves.


  2. So in such scenarios, you might want to keep most fields open but lock some of them on the Editable Grid itself. Let’s see how we can do it using JavaScript

JavaScript Code

Here’s a sample code which you can use to loop through all the fields you want to lock on the Editable Grid –

  1. Code within a class – [You can just use the lockFields function separately too.]

    oSubscriptionCustomization = {

    lockFields: function (executionContext) {
    var oFormContext = executionContext.getFormContext();
    if (oFormContext) {
    var arrFields = ["cft301_status"];
    var objEntity = oFormContext.data.entity;
    objEntity.attributes.forEach(function (attribute, i) {
    if (arrFields.indexOf(attribute.getName()) > -1) {
    let attributeToDisable = attribute.controls.get(0);
    attributeToDisable.setDisabled(true);
    }
    })
    }
    }
    };

  2. In the above code, I’m reading from an array called arrFields and all the fields listed in the array will be looped through and locked.
  3. Once my JS file is ready, I can open the Editable Grid control itself on the parent form and then loop for Events tab to register my function on the grid.

  4. In the Event tab, look for the UI Event called as OnRecordSelect

  5. Here, you can register your function. Since, I’m using class too – I’ll use classname.functionName

  6. Once done, save and publish your changes. Now, you’ll see that the field is locked when you select the record on the Editable Grid.

Hope this was useful!

Thank you!

Update SVG Icon to Custom Entity in Sitemap | Model Driven Apps

So, if you are used to updating Icons to entities in the classic UI, here’s what you need to do in order to update the SVG image of a Custom Entity you just created using new Power Apps Maker portal.

Let’s see below is you custom entity and it comes with its default icon which you want to set to a custom SVG icon.

Adding SVG Icon to Custom Entity

Given that you have appropriate access to the be able to Customize the system, follow the below steps –

  1. In your solution, you have the table as well as the SVG Icon you just created the Web Resource for and uploaded an image which you want to set as Icon.

  2. Now, select the Table you want to set the SVG icon to, and click on Properties.

  3. On the right hand pane, expand the Advanced area and look for the Choose table image field.


  4. Then, start typing the Display Name of the SVG icon which you wish to set to this Entity.


    Click Save if no other changes are to be done.

  5. Once Saved, click on Publish.

  6. Now, when you refresh the App where the custom entity is listed in the Sitemap, you’ll see the icon updated.

Hope this was useful!

Thank you!

Preferred Solution in Dataverse | Power Platform Admin Center

By default, everything goes inside a Default Solution if you are aware of the classic way of doing Customization in Dynamics 365 CRM. And this causes components to be lost in Default solution without knowing who created where and what was that.

Hence, to be able to collect all the components created outside of Solutions, Preferred Solution is a great way to automatically add components created outside Solution in a single solution to ensure accountability.

Let’s see how this works with help of this simple post!

Mark a Preferred Solution

Given you have appropriate rights like System Administrator or System Customizer, you can go to the Maker Portal (https://make.powerapps.com/), and follow the steps below –

  1. In the Power Apps Maker Portal, when you navigate to Solutions – you’ll see a message saying ‘Set your preferred solution’ and on the right hand-side show that the Common Data Services Default Solution is already preferred [You’ll know this from Customizations option in classic UI].

    And on the top, you’ll see button to Set preferred solution.


  2. Now, when you select to set preferred solution, you’ll see all the unmanaged solutions you have.
    Select the one you want to mark as Preferred for anything not directly added to a solution.

  3. Then, you’ll see that Preferred Solution label has been applied for that Solution.

  4. Now, even if you add anything directly from other areas like Tables and add a field (for example), it’ll end up having the Prefix of the Solution itself.


  5. In this example, it’s add Field 2. The Prefix set for the Preferred Solution was “cf301

  6. And when you open the Preferred Solution itself, the component you created outside the solution will be added to the Preferred Solution automatically.


  7. This way, it’s easy to not lose any customization in Default Solution and makes it easy for all the components which were created outside of the solution to be gathered in place when you want to investigate your environment!

Hope this was useful!

Thank you!

Use Monitor to debug Model-driven apps remotely | Power Platform

Monitor is one feature that comes in super handy when end-users complain about an issue which is difficult to ask end users to send across logs from the browser.

And here’s where Monitor comes in handy!
Let’s see how this works through this simple blog post!!

Capture events from Monitor in Model Driven Apps

Here’s how you can Monitor in Model-driven apps’ Monitor to capture issues on an End User

  1. You can go to Power Apps Maker Portal (https://make.powerapps.com/) and make sure you are switched to the intended environment.
  2. Then, select Apps on the left hand pane and expose all the Apps. Select the Model-Driven app you want to enable Monitor for. Once you select, you can then drop down from Details flyout menu and click on Monitor.

  3. Once you click on Monitor, it opens the Monitor application itself where all the logs you work on will be captured. And you can also notice that there’s a Play model-driven app button as well to enter in Debug mode.


  4. It opens the Model-driven app in a new tab and asks you to confirm if you want to join the debug session.

  5. Once you click on Join, it’ll run the app in debug mode and you can see the Monitor tab and notice that it has started capturing the logs based on your operations in the Model-driven app session you are running in parallel.


  6. And when you go about working in the model-driven app, it’ll keep capturing the traffic just like on a browser’s Network in Dev Tools

  7. Now I deliberately added an erroneous code in my custom JS so that I could capture an exception in the monitor.

  8. And if you look at the monitor, you’ll see that this has been captured.

  9. And this is the wrong script I entered so that my code wouldn’t find the incorrect field name and throw an error when I try to retrieve value from an attribute that doesn’t exist (without null checking if the attribute exists or not)

  10. However, best use case is when you ask end-users to join your session. Let’s see in the next session on how you can achieve this.

Invite Users to your Debug session

In the Model-driven apps monitor, here’s how you can invite other users to join your session –

  1. In the Monitor, you’ll see Invite or Connect to a User. For this example, I’ll choose Connect user option.

  2. Then, I can simply search for the User whom I want to generate a join link for.

  3. Now, once this user is added, you’ll see a copy link option to copy the link and pass it on to the user who needs to join.

  4. Once the end user has this link, then can join the session and they’ll see this message on their Dynamics model-driven app

  5. And similarly, once they start reproducing the issue, you can start capturing the traffic on your end.


Hope this was useful! In order to fully understand the capabilities of Monitor for model-driven apps, here’s Microsoft’s official documentation – https://learn.microsoft.com/en-us/power-apps/maker/monitor-collaborative-debugging?WT.mc_id=DX-MVP-5003911

Hope this was useful!

Thank you!