You need to sign in to do that
Don't have an account?
Mikhail Nitko 5
Bug in <apex:enhancedList /> when targetting the same object for multiple List Views?
Hi folks,
I'm trying to create a sort of "Master Case" window in Visualforce, that shows 3 List Views of the same Cases object.
I'm using the following code to do this.
The problem is that when the window finaly opens, each of the List Views is set to view the last List View ID that I used. Meaning that I get a window with 3 List Views, but they're all set to "MyOpenCases".
Is this a bug or am I doing something wrong?
Thank you for any help!
I'm trying to create a sort of "Master Case" window in Visualforce, that shows 3 List Views of the same Cases object.
I'm using the following code to do this.
<apex:page> <apex:enhancedList type="Case" height="300" rowsPerPage="25" id="Walk_in_Line" customizable="false" /> <apex:enhancedList type="Case" height="300" rowsPerPage="25" id="Web_Cases" customizable="false" /> <apex:enhancedList type="Case" height="300" rowsPerPage="50" id="MyOpenCases" customizable="false" /> </apex:page>And you can see where I'm targetting the same Object, but using a different ID each time, to target different List Views.
The problem is that when the window finaly opens, each of the List Views is set to view the last List View ID that I used. Meaning that I get a window with 3 List Views, but they're all set to "MyOpenCases".
Is this a bug or am I doing something wrong?
Thank you for any help!
This doesn't seem to be a bug.
The ID you have in the parameter should ideally be the 15 digit number you see when you try to edit the list view.
I tried the similar code, just made a couple of changes in the way you are accessing the IDs in the enhancedlist.
<apex:page >
<apex:enhancedList type="Case" height="300" rowsPerPage="25" listid="00B28000009ocqb" customizable="false" /> //ID recieved from the edit list view page
<apex:enhancedList type="Case" height="300" rowsPerPage="50" listid="00B28000009ocpJ" customizable="false" />
<apex:enhancedList type="Case" height="300" rowsPerPage="25" listid="00B28000009ocpl" customizable="false" />
</apex:page>
Hope this helps!
All Answers
This doesn't seem to be a bug.
The ID you have in the parameter should ideally be the 15 digit number you see when you try to edit the list view.
I tried the similar code, just made a couple of changes in the way you are accessing the IDs in the enhancedlist.
<apex:page >
<apex:enhancedList type="Case" height="300" rowsPerPage="25" listid="00B28000009ocqb" customizable="false" /> //ID recieved from the edit list view page
<apex:enhancedList type="Case" height="300" rowsPerPage="50" listid="00B28000009ocpJ" customizable="false" />
<apex:enhancedList type="Case" height="300" rowsPerPage="25" listid="00B28000009ocpl" customizable="false" />
</apex:page>
Hope this helps!
So in conclusion, using pure IDs, and the "listid" field is the way to go.
Thank you Sonam!