Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is "ListViewport"? I saw that some users use this object. And I can only guess that it is a JavaScript object. But I have found no official description for it.

Any ideas?

Example from the stack forum: ListViewport.instances[get('myId')].refreshList();

share|improve this question
up vote 6 down vote accepted

You must have seen ListViewPort in my question in the forum. I discovered ListViewPort while using Inspect Element on a Salesforce List View Refresh button, in Google Chrome. Hence, it is not a fail-safe approach.

refreshList() is a JavaScript function (written by Salesforce) to refresh a ListView. I found this functionality useful because my Apex Class makes changes on a button click, and I wanted the changes to reflect without refreshing the whole page, i.e., without using location.reload().

The get function (written by me) is get the URL parameter value.

will execute
in one of my pages:

Just in case you need it, here is the code to my get() function:

function get(name) { 
    if (name = (new RegExp('[?&]' + encodeURIComponent(name) + 
            '=([^&]*)')).exec( { 
        return decodeURIComponent(name[1]); 

And here is the screenshot of the element inspection:

enter image description here

share|improve this answer
Many thanks for your answer bro! Very cool idea to use undocumented functionallity. – Sergey Utko Dec 11 '12 at 17:51
Plenty of undocumented but useful Salesforce functionality out there. We should never use them - they can stop working without notice. I use them in my DEV org only. – Suman Krishna Saha Dec 23 '12 at 8:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.