You need to sign in to do that
Don't have an account?

Displaying values in Visual force
Hi,
I am new to Visual force so this question may seem way too obvious. I have a Search page and I would like to write the SOQL to the screen to see how it is constructed. Not sure how to do it.
This is a customer portal page so that user (whom I logged in as) is not available in the debug logs user list.
I just want to write the SOQL after it is constructed.
For ex: I have this soqlQuery = 'Select id,name from products'
the above is a very basic example but how do I write to this to the screen so I can look at how the soql query with all the search conditions and order by conditions is constructed
Thanks
I am new to Visual force so this question may seem way too obvious. I have a Search page and I would like to write the SOQL to the screen to see how it is constructed. Not sure how to do it.
This is a customer portal page so that user (whom I logged in as) is not available in the debug logs user list.
I just want to write the SOQL after it is constructed.
For ex: I have this soqlQuery = 'Select id,name from products'
the above is a very basic example but how do I write to this to the screen so I can look at how the soql query with all the search conditions and order by conditions is constructed
Thanks
Once you have constructed your query, store it in a controller property, e.g.
public String soqlStr {get; set;}
...
soqlStr=<constructed query>;
You can then output this to the page using:
{!soqlStr}
All Answers
Once you have constructed your query, store it in a controller property, e.g.
public String soqlStr {get; set;}
...
soqlStr=<constructed query>;
You can then output this to the page using:
{!soqlStr}