Hi all
I've created a custom plugin with three parameters:
I registered the plugin with Plugin Registration Tool without additional steps. My error COULD BE here, but I don't know how to register a step to a global action not tied to any entity; the tool asks for an Event Handler and I don't know which one to assign, because all the Event Handlers available to me refer to other actions of the plugin that are not remotely related to this one.
Then I've created a custom process on my Dynamics organization (v8.2) and created the input and output parameters. I've added a step to insert the value of the input parameter, but I haven't created any additional steps to fill the values of the output parameter because when I try to do it none of the offered values look sensible to me. Even though, I've tried with those values and get errors.
Then I've created a javascript function to call the plugin from inside a webresource.
And the situation is as follows:
I've also tried the following:
In Dynamics' custom action form, I've tried to insert a "perform action" step, and then I was able to set the output variables with the results of the action call. BUT if I do it this way, when the javascript makes the request to my organization API with the name of the custom action, the action is stopped because it would become an infinite loop; as it should be: I'm calling an action that calls itself!
Please help, I'm really stumped with this.
it works for me. Thanks
Switching it to synchronous fixed the issue for me. I wish I knew why async won't work, but it doesn't.
Hi
I had a similar issue. I have a global action I was using to trigger a plugin from a ribbon button. The plugin would execute without any issues however all output parameters would return as null.
After hrs of debugging and triple checking both the JS code and the C# code it turned out that I had left the plugin as an asynchronous plugin in the registration tool. When I changed back to a synchronous plugin the output parameters started coming through no problems.
Hi, thanks for the reply.
Sadly, I'm having the same problems calling the Action from Javascript or from C# console: the return arguments are always null. As I've said, I know the arguments should NOT be null because the internal logic of my Action gets the values and establishes those values on the return parameters. It's the ACTION defined in Dynamics the one that seems unable to get those values, I suspect because I'm missing a step, there's have to be something after defining an output parameter in a custom action that I'm missing.
Also please note that one of the things that I tried was to bypass my C# action code completely and just return literal values as a test, for example return a "HELLO" on one of the variables and an empty string on the other, and got null values on both anyways.
Hi,
You can try couple of things-
1. Use Rest Builder tool to fire your Custom action to see response in this tool.
Download link - github.com/.../releases
2. Try to execute your custom action using C# console code. Find code in below link. Then check the reponse and see if it contains your output parameter.
mscrmdynamicssite.wordpress.com/.../
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156