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 Event_ID__c
lookup.
Any idea on how to do this?
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 Event_ID__c
lookup.
Any idea on how to do this?
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.