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
ok, writing lots of JavaScript logic is a messy think, but creating js code that triggers the “real” logic via a create operation (more or less a command-pattern) will also result in a complex solution.
Depending on the level of complexity and the requirements (e.g. executing an operation on behave of another user is not possible in js) I would always prefer a pure js approach. To reduce the complexity try a library that provideds you with the core functionally:
CrmRestKit
XrmServiceToolkit
Have fun
Daniel