0

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?

3

1 Answer 1

3

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .