Created
March 21, 2022 11:32
-
-
Save srujan21/7daba2196c20549b7e570ed19b44bfe6 to your computer and use it in GitHub Desktop.
This will give us all the related child relationship fields for given parent and child sObjects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (ChildRelationship relationship : SObjectType.sfcloud__Product_Bundle__c.getChildRelationships()){ | |
if (relationship.getChildSObject() == sfcloud__Product_Line_Item__c.sObjectType) | |
system.debug(relationship.getRelationshipName()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment