Dear all,
I write a plugin to get page values and set some fields, and it is triggered by a custom ribbon button. So I reference the following link https://www.greenbeacon.com/insights/trigger-plugin-from-ribbon-button-using-custom-actions-in-dynamics-crm-2013/ to create an action first and then write some javascript code as it said. And I also register my plugin 'pre-operation' stage.
Its execution order should be Ribbon button > JS > Action > Plug-in
Now there are some custom error messages in my plugin, need to be shown up on the client side (maybe alert)
I tried to add InvalidPluginExecutionException("my error message.") in the plugin but I don't know how to get it in my javascript function.
Or should I add an output parameter in my action? But I notice that if you want to get the output value in your action, you should only register plugin on 'post-operation' stage?
Thank you for your help.
*This post is locked for comments