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
I'm late for the party here, but just to simplify things for people looking at this topic for the newest version of CRM (because it's tagged as crm online): Currently there is something which is called "Action" that can be created the same way as Workflow or Business Process Flow. You can specify input and output parameters for that Action. Main advantages:
you can register a plugin for that action, so instead of running jScript logic you can run some c# logic
you can call this action using webAPI
As for CRM 2011 although it's already quite outdated - better approach than suggested in the accepted action is to run your logic on post RetrieveMutliple of your custom entity, so that you will avoid creation/deletion of some magic records (and users will only have to have Read privilege for them, not create or update).