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

List View VFPage
I have created a VF Page of an opportunity list view. One of the fields is Opportunity Name. When you click the name it opens the record in the VFPage. Can I modify the code to open a new tab when the opportunity is clicked?
<apex:page sidebar="false">
<apex:enhancedlist height="450" listid="00Be0000001eBaB" rowsperpage="100">;
</apex:enhancedlist></apex:page>
<apex:page sidebar="false">
<apex:enhancedlist height="450" listid="00Be0000001eBaB" rowsperpage="100">;
</apex:enhancedlist></apex:page>
You are on the right path but it looks like your queryString is breaking. Please see updated code below.
In example below, we are using Dynamic SOQL which works little differently than normal SOQL. In Dynamic SOQL, you have to pass all parameters in string format. Please take a look at Line 9 and 10 where we are converting SOQL in strings datatype. Also, look at the updated line 11 where we have updated the queryString.
Here is an article on Dynaimic SOQL for your future reference,
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm
Did it help you? Please mark this as Best Answer if it did!
All Answers
You wont be able to do that using <apex:enchancedlist> however, you can do it using Custom List Controller. Please try code below,
Controller: VF page:
Please mark this as Best Answer if it helps you!
Controller:
VF Page:
Please mark this as Best Answer so that it can help others!
Cheers!
You are on the right path but it looks like your queryString is breaking. Please see updated code below.
In example below, we are using Dynamic SOQL which works little differently than normal SOQL. In Dynamic SOQL, you have to pass all parameters in string format. Please take a look at Line 9 and 10 where we are converting SOQL in strings datatype. Also, look at the updated line 11 where we have updated the queryString.
Here is an article on Dynaimic SOQL for your future reference,
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm
Did it help you? Please mark this as Best Answer if it did!
I have made a few changes to make the code work the way I want. The last thing I want to be able to to acheive is giving the user the ability to sort the column headers. Is that possible?
Apex:
Visual Force