How to get all related objects for an object in Salesforce?

Sample code:


  1. for ( ChildRelationship r: Opportunity.SObjectType.getDescribe().getChildRelationships() )  
  2.     system.debug( string.valueOf( r.getChildSObject() ) );  

Output:



No comments:

Post a Comment