Sample wrapper around Dependencies API Pilot.
The wrapper make it even easier to query and produces the output in human readable format.
-
It will create a list of dependencies in a csv under 'My Personal Documents'
-
Email the dependencies in a .csv document to the user running.
Once you have deployed in your Org.
- Find metadata that depends on 'Order' object:
DependencyService.withRefTo('Order');
- Find metadata that depends on an object's field by Id:
DependencyService.withRefToById('00N3000000Bact4EAB');
- Find metadata that depends on a ApexClass:
DependencyService.withRefTo('Utils');
- Run with query:
String queryStr = 'SELECT MetadataComponentName, MetadataComponentType,RefMetadataComponentName,RefMetadataComponentType FROM MetadataComponentDependency WHERE RefMetadataComponentName = 'Apttus__APTS_Agreement__c';
DependencyService.withQquery(queryStr); .