+ Start a Discussion

can i add more than 10 columns in related list using visual force page?

the standard related list for Quote Line Item only limited to display 10 columns but i have more columns need to be displayed. Can i create a visualfoce related list page to display > 10 columns in for quote line items? Please guide me with sample code.

Amit Chaudhary 8Amit Chaudhary 8
Please check below post
1) https://help.salesforce.com/apex/HTViewSolution?id=000003207
2) http://sfdcsrini.blogspot.com/2014/05/how-to-create-visualforce-related-list.html

With Check box
<!-- This is a Custom VisualForce page that will display the CaseComments related list. It also has input field for the user to change the value of isPublished on CaseComments. Embed this page into a Case Page Layout -->
<apex:page standardcontroller="case"  extensions="checkbox" tabstyle="case">
    <apex:pageBlock title="Case Comments" mode="new" >    
        <apex:form >
        <apex:commandButton value="Save" action="{!customSave}"/> <!-- This is the Custom Save Button -->
                <apex:pageBlockTable value="{!Records}" var="index">    <!-- The pageBlockTable iterates through the list of the custom Class -->
                    <apex:column > <apex:inputCheckbox value="{!index.published}"/> </apex:column>    <!-- Stores the input value from the user -->
                    <apex:column value="{!index.comment.isPublished}"/>    <!--Display the CaseComments information -->
                    <apex:column value="{!index.comment.CommentBody}"/>
public class checkbox {
    public class AssignComment        // This class will be used to store the corresponding input from the user and the CaseComment.
        public CaseComment comment {get; set;}        //This will store the CaseComment.
        public Boolean published {get; set;}          //This will store the input from the user.
        public AssignComment(){}                      //Empty constructor.
    public List<assignComment> Records {get; set;}    //This will store the list of CaseComments as well as the corresponding user inputs.
    public checkbox(ApexPages.StandardController controller)
        Records = new List<AssignComment>();          
        Case Record = (Case) controller.getRecord();    //Get case from controller.
        for (CaseComment Node : [Select commentBody, isPublished from CaseComment where parentId = :Record.Id])    //Query and loop through all the CaseComments.
            assignComment temp = new AssignComment();   // Create temp to insert into the list Records.
            temp.comment = Node;
            temp.published = Node.isPublished;
    public PageReference CustomSave()    //This class will take the input from the user and update the corresponding CaseComments.
        List<CaseComment> updateList = new List<CaseComment>();    //Create a list of CaseComments to be updated.
        for (AssignComment a : Records)        //Loop through Records.
            a.comment.isPublished = a.published;    //Update CaseComments with user input.
        return null;

Ok i manage to create my own related list already but how can i put the quote line item id ?
<apex:pageBlockTable value="{!Quote.QuoteLineItems}" var="o" >
        <apex:column >
            <apex:commandlink action="{!URLFOR($Action.QuoteLineItem.Edit,o.Id,[retURL=Quote.Id])}" style="font-weight: bold;">Edit</apex:commandlink> |&nbsp; 
            <apex:commandlink onclick="return confirm('Are you sure?');" action="{!URLFOR($Action.QuoteLineItem.Delete,o.id,[retURL=Quote.Id])}" style="font-weight: bold;">Del</apex:commandlink>
        <apex:column value="{!o.Product2Id}"/>
        <apex:column value="{!o.Discount__c}"/>
        <apex:column value="{!o.Ext_Net__c}"/>


Product2Id will direct me to the product page. Which field should i use for quote line item detail page?