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

framing the soql from the listview columns based on metadata fetch

framing the soql from  the listview columns based on metadata fetch and querying it using the partner wsdl


 i queried an opportunities list view.. for example all opportunities it lists me columns like CORE.USER.ALIAS, FULL_Name, etc. How do i frame an SOQL by getting these column names.. 

for ex: am expecting the output like select core.user.alias,full_name,, from opportunity

i should be able to query with the columns nodes available in the xml retrieved from the metadata call..

any ideas????



can someone reply to my post. am struggling for a long time :(


Me too.  You would think that SFDC would provide an accessor method on Database.QueryLocator to access the derived SOQL, calculated from the ListView criteria, but they don't.   You shouldn't have to parse metadata XML and build up the SOQL yourself when they already have code (hidden from us poor, sucker developers) that does this.