CRM 2011: JavaScript Libraries in Form for Ribbon Customizations

We know that we can put a reference for Javascript library web resource on an entity form to use its functions. But what about ribbon customizations that uses Javascript?

Well, for ribbon customizations in the entity form ribbon, the referenced Javascript library will also available. For example, if you add a custom button on the entity form ribbon, json or sdk.rest library that you added to the form will also be available for use.

However, it is NOT available for use for subgrid ribbon customization. For example, if you add a custom button on entity new_a subgrid ribbon, this button will be shown when you click on new_a subgrid on related entity new_b form. But the referenced library for entity new_b form will not be available for new_a subgrid custom ribbon button.

Sucks! But makes sense given that the subgrid is available on all related entities form, and the referenced libraries on entity new_b form might not be added for entity new_c form and so on.