function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfdc Beginnersfdc Beginner 

Dynamic Apex

What is dynamic Apex? What are the uses? How is it different from normal Apex ? can anyone please throw some light on this.

Thanks in Advance
Best Answer chosen by sfdc Beginner
logontokartiklogontokartik
Dynamic apex is basically building code without knowing what types of SObjects you are accessing or what type of fields you are using during compile time, basically using the describe information (Schema Super Class). 


The following links explain in details with usecases. Hope this helps.

http://stackoverflow.com/questions/14002709/what-is-a-dynamic-apex-in-salesforce

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic.htm


All Answers

logontokartiklogontokartik
Dynamic apex is basically building code without knowing what types of SObjects you are accessing or what type of fields you are using during compile time, basically using the describe information (Schema Super Class). 


The following links explain in details with usecases. Hope this helps.

http://stackoverflow.com/questions/14002709/what-is-a-dynamic-apex-in-salesforce

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic.htm


This was selected as the best answer
sfdc Beginnersfdc Beginner
Thank you.