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>();

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.