+ 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.