I have an object
Event_Booking__c. I want to get all the fields from that object which is related to the
Event__c object through
Any idea on how to do this?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
You can use Dynamic Apex to perform describe call on object for which you want to get meta-data as described in below example:
List<String> fields = new List<String>(); fields.addAll((Event__c.SObjectType.getDescribe().fields.getMap().keySet());
Above code will return all fields of
Event__c Object which will get stored in List of type String.