Call C# Code from Ribbon JScript CRM Online 2011

前端 未结 5 1837
醉梦人生
醉梦人生 2020-12-05 21:14

I need to have some code execute on the click of the ribbon button on an entity that updates some related data from CRM Online 2011. I would prefer not to have to write all

5条回答
  •  渐次进展
    2020-12-05 21:28

    You can't add your own web services or create your own custom plugin messages in 2011. The best way we've found of doing this is to:

    1. Set up a entity that exists exclusively to run custom code on the server.
    2. Give it attributes called message name and another property to pass in parameters in whatever format you choose (XML, JSON, etc.)
    3. From your JavaScript, create an instance of that entity passing in the correct parameters.
    4. Have a plugin attached to the Create message of that entity, and then it reads in the parameters and executes whatever custom code you'd like.

    While just randomly passing in an Assign message or something might work, it's probably unsupported in Microsoft's eyes, and it would be hard as hell to debug if someone else ever had to look at this system.

提交回复
热议问题