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
mahesh reddy 4mahesh reddy 4 

dynamic apex

what is dynamic apex? what is the use of it? please tell me the link to access content on dynamic apex?
PratikPratik (Salesforce Developers) 
Hi Mahesh,

Dynamic SOQL basically involves dynamically/run time access to Salesforce object, object definition, schema, SOQL,SOSL etc.

Yopu can go through this Salesforce documents for details and examples:
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic.htm

Thanks,
Pratik

P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
Deepak Kumar ShyoranDeepak Kumar Shyoran
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 metadata 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.

Access Salesforce app information

You can obtain describe information for standard and custom apps available in the Salesforce user interface. Each app corresponds to a collection of tabs. Describe information for an app includes the app’s label, namespace, and tabs. Describe information for a tab includes the sObject associated with the tab, tab icons and colors.

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. This can be useful for applications that are installed from Force.com AppExchange.