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

difference between apex and dynamic apex


any one please tell me what is difference between apex and dynamic apex.







Dynamic Apex


Dynamic Apex enables developers to create more flexible applications by providing them with the ability to:


Access sObject and field describe information


Describe information provides information about sObject and field properties. For example, the describe information for an sObject includes whether that type of sObject supports operations like create or undelete, the sObject's name and label, the sObject's fields and child objects, and so on. The describe information for a field includes whether the field has a default value, whether it is a calculated field, the type of the field, and so on.


Note that describe information provides information about objects in an organization, not individual records.


Write dynamic SOQL queries, dynamic SOSL queries and dynamic DML

Dynamic SOQL and SOSL queries provide the ability to execute SOQL or SOSL as a string at runtime, while dynamic DML provides the ability to create a record dynamically and then insert it into the database using DML. Using dynamic SOQL, SOSL, and DML, an application can be tailored precisely to the organization as well as the user's permissions.



Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control Statements on the platform server in conjunction with calls to the API. Using syntax that looks like Java and acts like database stored procedures, Apex enables developers to add business logic to most system events, including button clicks, related record updates, and Visualforce pages. Apex code can be initiated by Web service requests and from triggers on objects.


Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.