Mass cretaion in cases module

I need to apply mass creation in the cases module to accounts that relate to a custom module, so when I create a case related to the custom module, this automatically creates the cases for each account that is related to the custom module.

the relations are:
custom module - accounts (many to many)
custom module - cases (one to many)

I think the way is to create it via logic hooks. You will need to load the relationship of the selected record and loop it to create cases as required.
The following links should help you to accomplish what you want: