+ Start a Discussion
Sandesh D GanjareSandesh D Ganjare 

Is there is any event that fire when the Custom report type is created?

My requirement is that whenever the Custom report Type is created I want to do DML operation on Custom object. That will store the information related to that Custom report Type.

James LoghryJames Loghry
There is no event to speak of when creating a report type.  Instead, you should use the metadata api to pull in info for a report type when you need it.  Unfortunately, there's no way I know of to list all the report types either, so a batch job would not be practical either.  

Here's the info that comes back via the metadata api for report types: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_reporttype.htm?search_text=report%20types
Here's an apex wrapper you could use to call the metadata API from Apex: https://github.com/financialforcedev/apex-mdapi