Xrm Tools v1.0.7 Released – Write client code to call Power Platform (Custom API, actions et all) with a click.

Xrm Tools just got a major productivity boost in version 1.0.7 with a brand-new Roslyn-based code refactoring provider that makes calling Custom APIs, Custom Actions, and even standard Power Platform messages easier and more intuitive than ever before – all from within Visual Studio. It also helps keep your code up-to-date should any of your messages change in future.
Gone are the days of:
- Running external tools to generate proxy classes.
- Maintaining separate config files.
- Manually looking up message names and parameters.
- Or hand crafting the request and response types.
- Wondering if your typed message is still in sync with the metadata.
Let Visual Studio and Xrm Tools do the heavy lifting.
New Feature: Generate Strongly-Typed Request and Response Classes
With v1.0.7, you can now:
- Create a class and decorate it with
[RequestProxy("MyCustomAPI")]
or[ResponseProxy("MyCustomAPI")]
. - Use the Visual Studio light bulb (Ctrl + .) to generate the strongly-typed OrganizationRequest and OrganizationResponse-based classes.
- Get IntelliSense, nullable annotations, and even the required keyword on non-optional fields, depending on the context and language you use.
- Keep the classes up-to-date as your API evolves – just run the refactoring again.
See it in action
Here is how a typed request class is generated by just providing the name of the message (can be your Custom API or Action).

Here is how a typed response class is generated by just providing the name of the message (can be your Custom API or Action).

Finally, here is how to use Execute method of OrganizationService to call the message.

You can update to version 1.0.7 of Xrm Tools via the Visual Studio Marketplace or through Extensions > Manage Extensions in Visual Studio.
Do you have any suggestions? please open an issue in GitHub