My 1st little App Exchange: SOQL Query Tool

As a little exercise, I’ve created a small tool comprised of a VisualForce page/tab that allows system administrators to run ad-hoc SOQL (SOSL and aggregate queries) from within their applications and do mass update on every page of 100 records. Basically, it reproduces a little of the functionality of the DeveloperForce utility Mass Update Anything.

This tool is available at the AppExchange for free:   goo.gl/90V8f

(The listing is private because SalesForce seems to only allow SalesForce Pardners – that is, companies – to take their apps to security review and make them public.)

SOQL Query Tool screenshot
The results of an ad-hoc query executed in SOQL Query Tool (click to expand).

In one class I used ApexPages.StandardSetController with a Database.QueryLocator to implement pagination of the query results.

objStdSetCtrl = new ApexPages.StandardSetController( Database.getQueryLocator( SOQLText ) );

In the VisualForce page I used the tag apex:repeat to display a dynamic list of columns nested in an apex:pageBlockTable that iterates on the query results’ rows.

<apex:pageBlockTable id="ResultsTbl" value="{!QryResults}" var="row">
    <apex:repeat id="ColumnsRpt" value="{!LstColNames}" var="col">
         <apex:column >
                {!col}
                <apex:outputLink rendered="{!( col == 'Id' || col == 'Name' )}" value="/{!row.id}" target="new">
 <apex:outputText value="{!row[col]}" />
...

Posted

in

, ,

by

Tags:

Comments

2 responses to “My 1st little App Exchange: SOQL Query Tool”

  1. King Koo avatar
    King Koo

    Sorry, getting this:
    java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: 80

  2. Charlie Voss avatar
    Charlie Voss

    Is this tool still available? Would really like to see this!