Hi all
I've created a custom plugin with three parameters:
- Url, input: A parameter with the URL pointing to a file stored in a file server
- B64, output: A string parameter to contain the file entered as input, encoded as B64 string
- MIMEType, output: A string parameter to contain the mime type of the file entered as input
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:
- The plugin works. The javascript is able to execute the plugin and I've traced every step of the plugin's C# code and it's OK. The local variables I use to store the two values are filled with correct data, and then the [OutputParameter] variables are also filled; I've checked their values and they're ok. 
- The javascript receives a 200 response with the two expected parameters, but the parameters are NULL. Always null. There's a middle step I'm missing between my C# code establishes the values in the output parameters and the custom action returns those values to the javascript, but I don't know where's the problem. 
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.