I’ve just released my latest XrmToolBox tool – Custom Action to Custom API Converter!
Converting manually
If you’ve got Custom Actions in your Dataverse solutions, it can be intimidating looking at converting them all to APIs. There’s lot of good new features that Custom APIs offer that weren’t available for Custom Actions. However, it’s a lot of effort to have to delete and recreate everything, with plenty of potential for error.
- Check what input and output parameters there are, using the classic solution editor
- Check what plugins are registered against the action using the Plugin Registration Tool
- Delete the plugin steps
- Deactivate and delete the Custom Action
- Create the Custom API, making sure you select all the correct options
- Add the input and output parameters
- Add the plugin steps back
Converting automatically
My new tool simplifies the process significantly. Just select the solution that contains your Custom Actions, select the action, check everything looks correct and click Convert.
The tool removes the Custom Action and recreates it as a Custom API, preserving all the settings. The name, description, request and response parameters and plugins will all be ported over. If you use the common pattern of having a synchronous, post-operation plugin to implement the logic of the action, the tool will automatically move this to be the “core” plugin for the Custom API.
If you have used the workflow engine to add a body to the Custom Action, that part won’t be converted and you’ll need to re-implement it as a plugin to get it to work as a Custom API. The conversion tool detects this however, and gives you a warning to ensure nothing gets lost accidentally:
If you have an existing Custom Action like:
and you’ve added a plugin to implement it as:
after the conversion you’ll see the following components in your solution:
I hope this is a good time saver for you and helps you efficiently upgrade to the latest technology and start taking advantage of the new opportunities offered by Custom API!