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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.