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
raviteja p 21raviteja p 21 

Create a VF page with Account fields.They are account name and industry .After entering values in these fields Query should be formed with this dynamic values which are coming from VF page.Fetch the results by executing that query and display in VF page.

Pradeep SinghPradeep Singh
Hi Raviteja,

Create 2 inputText elements in VFpage which is linked to 2 string variables to apex class.Create a button to call apex controller method.
In this method, Use string variables to get the values to create a query and store it in a string variable and then use dynamic query to get the result in a List of sObject(your object API name).
Show this List on page. 

Refer https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm for dynamic query.