• di_zou
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 22
    Questions
  • 29
    Replies

I have a custom controller that returns a dictionaty like this:

 

Map<String, String>

 

In my visualforce page, how do I access this dictionary? Beofre the Winter '13 release, I could do this:

 

<apex:variable value="{!results[key]}" var="result"/>

 

However, this no longer works with the Winter '13 release. How do I do this in the latest release?

  • October 15, 2012
  • Like
  • 0

I am trying to have my Customer Portal use a custom URL instead of the Salesforce one. The Salesforce one right now looks like this: https://cs13.salesforce.com/secur/login_portal.jsp?orgId=<orgId>&portalId=<portalId>

 

I followed the instructions here to set everything up:

http://wiki.developerforce.com/page/Authenticating_Users_on_Force.com_Sites

 

My SiteLoginController looks like this:

 

global with sharing class SiteLoginController {
    global String username {get; set;}
    global String password {get; set;}

    global PageReference login() {
        String startUrl = 'https://cs13.salesforce.com/secur/login_portal.jsp?orgId=<orgId>&portalId=<portalId>';
        return Site.login(username, password, startUrl);
    }
    
    global SiteLoginController () {}
    
    @IsTest(SeeAllData=true) global static void testSiteLoginController () {
        // Instantiate a new controller with all parameters in the page
        SiteLoginController controller = new SiteLoginController ();
        controller.username = 'test@salesforce.com';
        controller.password = '123456'; 
                
        System.assertEquals(controller.login(),null);                           
    }    
}

 However, when I go to my login page and try and login, nothing happens. How do I get this to work?

 

Additionally, instead of my portal being at http://mycompany.test.cs13.force.com/apex/SiteLogin, I want it to be something like http://suport.mycompany.com. How would I do that?

  • October 12, 2012
  • Like
  • 0

I have a VisualForce page that uses a custom controller. This is my controller:

 

global class CompanyCasesQuery {

    //constructors and variable declaration
    
    global List<Case> results {
        get {
            //returns a list of cases
            
            return results;
        } 
        set; 
    }
    
    public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>();
        options.add(new SelectOption('00BW0000000PeSVMA0','View All Open Cases'));
        options.add(new SelectOption('00BW0000000PbzWMAS','View All Cases'));
        options.add(new SelectOption('00BW0000000PeSGMA0','View All Closed Cases'));
        options.add(new SelectOption('00B300000005XQtEAM','Recently Viewed Cases'));
        return options;
    }
        
    public String[] getFilterId() {
        return filterid;
    }
        
    public void setFilterId(String[] filterid) {
        this.filterid = filterid;
    }
}

 

This is my VisualForce page:

 

<apex:page controller="CompanyCasesQuery" sidebar="true" showHeader="true">
    <apex:form >
        <apex:pageBlock title="My Cases">
              <apex:outputLabel value="View:"/>
              <apex:selectList value="{!filterId}" size="1">
                <apex:actionSupport event="onchange" action="{!results}" rerender="cases_table"/>
                <apex:selectOptions value="{!items}"/>
              </apex:selectList>
            <apex:pageBlock >
                <apex:pageBlockTable value="{!results}" var="c" rows="50" id="cases_table" >
                    <apex:column >
                        <a target="_parent" href="/{!c.id}">{!c.CaseNumber}</a>
                        <apex:facet name="header">Case Number</apex:facet>
                    </apex:column>
                </apex:pageBlockTable>
            </apex:pageBlock>
        </apex:pageBlock>
    </apex:form>
</apex:page>

The cases show up correctly and the select list shows up correctly. However, when I select an option in my select list, nothing happens. What I would like to have happen is when I select an option in the select list, my cases refresh like the default Salesforce cases page. When I select "View All Cases", all cases are displayed, when I select "View All Closed Cases", only closed cases are displayed. How do I get this select list refresh to work? Thanks.

 

  • October 02, 2012
  • Like
  • 0

I am trying to make a custom page in my Customer Portal that shows ALL the cases of an account instead of just that specific user's. I received some help from another user on this board and he recommended I do this in my custom controller:

 

    Id accountId = [SELECT Contact.AccountId FROM User WHERE Id = :UserInfo.getUserId()].Contact.AccountId;
    List<Case> results = [SELECT Id, CaseNumber FROM Case WHERE AccountId = :accountId];

 

However, this does not return ALL the cases for the user's account. This still only returns the cases that the user himself opened. I am looking to get a list of cases that other users that are part of the account have opened as well. What am I missing here? Thanks!

  • October 01, 2012
  • Like
  • 0

I am trying to make a custom page in my Customer Portal that shows ALL the cases of an account instead of just that specific user's. 

 

The SQL statement I am using in my VisualForce page to do this is:

 

    SELECT CaseNumber, AccountId, Subject FROM Case WHERE AccounttId = {!$User.AccountId}

 

However, I get this error:

 

    Error: Field AccountId does not exist. Check spelling 

 

How would I create this custom page that shows all cases?

  • September 25, 2012
  • Like
  • 0

I am trying to create a custom Visualforce page with a custom controller by following the example on this page:

http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_custom.htm

However, when I view the page that uses the code given in the example, I get this error:

List has no rows for assignment to SObject An unexpected error has occurred. Your development organization has been notified.

I just copied and pasted the code from the example into a custom class and a custom visualforce page. How do I fix this issue? Thanks!

  • September 24, 2012
  • Like
  • 0

I have a Visualforcepage with an apex:pageBlocKTable displaying Cases. I am trying to add the ability to sort the cases by CaseNumber.

I looked over this wiki page: http://wiki.developerforce.com/page/Sorting_Tables and implemented it, but I am getting an error.

 

This is my Visualforce page:

 

 

<apex:page standardController="Case" extensions="caseSort" recordSetVar="Case" sidebar="true" showHeader="true">
    <apex:form >
        <apex:pageBlock title="Cases">
                <apex:pageBlockTable value="{!case}" var="c" rows="50" id="cases_table" >
                    <apex:column >
                        <a target="_parent" href="{!URLFOR($Action.Case.View, c.id)}">{!c.CaseNumber}</a>
                        <apex:facet name="header">
                            <apex:commandLink value="{!$ObjectType.Case.Fields.CaseNumber.Label}" action="{!doSort}" rerender="table">
                                <apex:param name="sortField" value="CaseNumber" assignTo="{!sortField}"/>
                            </apex:commandLink>
                        </apex:facet>
                    </apex:column>
                    <apex:column value="{!c.ContactId}" />
                    <apex:column >
                        <a target="_parent" href="{!URLFOR($Action.Case.View, c.id)}">{!c.Subject}</a>
                        <apex:facet name="header">Subject</apex:facet>
                    </apex:column>
                    <apex:column value="{!c.Status}" />
                    <apex:column value="{!c.Priority}" />
                    <apex:column value="{!c.CreatedDate}" />
                </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
    <base target="_parent"/>
</apex:page>

 

and this is my controller:

 

public class caseSort {

    public caseSort(ApexPages.StandardSetController controller) {

    }

    List<Case> cases;
    public String sortField {get; set;}
    public String previousSortField {get; set;}

    public List<Case> getCases() {
        if(cases == null){
            cases = [select CaseNumber, ContactId, Subject, Status, Priority, CreatedDate from Case];
        }
        return cases;
    }
            
    public void doSort(){
        String order = 'asc';
        
        /*This checks to see if the same header was click two times in a row, if so 
        it switches the order.*/
        if(previousSortField == sortField){
            order = 'desc';
            previousSortField = null;
        }else{
            previousSortField = sortField;
        }
       
        //To sort the table we simply need to use this one line, nice!
        superSort.sortList(cases,sortField,order);
    }
}

 

When I go to the page and click the CaseNumber header to sort, I get this error:

 

    Attempt to de-reference a null object

    Error is in expression '{!doSort}' in component <apex:page> in page casestestpage
 

    An unexpected error has occurred. Your development organization has been notified.

 

What am I doing wrong, and what do I have to do to fix it? Thanks!

  • August 23, 2012
  • Like
  • 0

I have a custom Cases apex page where I use a apex:pageBlockTable to display my list of Cases. Here is the code for it:

<apex:page standardController="Case" recordSetVar="Case" sidebar="true" showHeader="true">
    <apex:form >
        <apex:pageBlock title="Cases">
              <apex:outputLabel value="View:"/>
              <apex:selectList value="{!filterId}" size="1">
                <apex:actionSupport event="onchange" rerender="cases_table"/>
                <apex:selectOptions value="{!listviewoptions}"/>
              </apex:selectList>
            <apex:pageBlock >
                <apex:pageBlockButtons >
                </apex:pageBlockButtons>
                <apex:pageBlockTable value="{!case}" var="c" rows="50" id="cases_table" >
                    <apex:column >
                        <a target="_parent" href="{!URLFOR($Action.Case.View, c.id)}">{!c.CaseNumber}</a>
                        <apex:facet name="header">Case Number</apex:facet>
                    </apex:column>
                    <apex:column value="{!c.ContactId}" />
                    <apex:column value="{!c.Subject}" />
                    <apex:column value="{!c.Status}" />
                    <apex:column value="{!c.Priority}" />
                </apex:pageBlockTable>
            </apex:pageBlock>
        </apex:pageBlock>
    </apex:form>
    <base target="_parent"/>
</apex:page>

I would like to get a button inside my apex:pageBlockButtons like in the default Cases page. When the user clicks the button, I would like it to take the user to the new Cases page. I tried this:

<apex:commandButton action="{!new}" value="New"/>

but that gave me an error. How do I make a button that will take me to the new Cases page?

  • August 15, 2012
  • Like
  • 0

I have a custom Cases Apex page. I want to be able to display a list of cases and then be able link to the individual cases in each row like the default cases page. This is what I have so far:

 

<apex:page standardController="Case" recordSetVar="Case" tabstyle="Case" sidebar="true" showHeader="true">
    <apex:form >
        <apex:pageBlock >
            <apex:panelGrid columns="2">
              <apex:outputLabel value="View:"/>
              <apex:selectList value="{!filterId}" size="1">
                <apex:actionSupport event="onchange" rerender="cases_table"/>
                <apex:selectOptions value="{!listviewoptions}"/>
              </apex:selectList>
            </apex:panelGrid>
            <apex:pageBlockTable value="{!case}" var="c" rows="50" id="cases_table" >
                <apex:column value="{!c.CaseNumber}" />
                <apex:column value="{!c.ContactId}" />
                <apex:column value="{!c.Subject}" />
                <apex:column value="{!c.Status}" />
                <apex:column value="{!c.Priority}" />
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

However, no links are showing up in any of the rows. When I click an individual Case Number, nothing happens. How do I get links to each of the cases to show up? Thanks.

  • August 14, 2012
  • Like
  • 0

I am writing a custom page to display my cases and using an apex:pageBlockTable. When I render the page, it looks like this:

 

 

This is my code for it:

 

<apex:page standardController="Case" recordSetVar="Case" tabstyle="Case" sidebar="true" showHeader="true">
    <apex:pageBlock >
        <apex:pageBlockTable value="{!case}" var="c" rows="50" >
            <apex:column value="{!c.CaseNumber}" />
            <apex:column value="{!c.Priority}" />
            <apex:column value="{!c.Status}" />    
            </apex:pageBlockTable>
    </apex:pageBlock>
</apex:page>

 

How do I get a dropdown menu to select different views like in an apex:listView? What I am looking for is in the top left of this screenshot:

 

 

Here is the code for it:

 

<apex:component >
    <apex:stylesheet value="{!URLFOR($Resource.background_template)}"/>
    <apex:pageblock title="Cases">
    <!--<apex:pageBlockSection ></apex:pageBlockSection>-->
    <apex:outputPanel layout="block">
    <ul>
        <apex:ListViews type="Case">
        </apex:ListViews>
    </ul>
    </apex:outputPanel>
    </apex:pageBlock>
</apex:component>

So I want to get the View dop down that is in the apex:listView into an apex:pageBlockTable. How would I do that? Thanks.

I have a apex:listView for my Cases:

 

<apex:ListViews type="Case">
</apex:ListViews>

 

When I display this page, I get the columns Action, Case Number, Contact Name, Subject, Status, Priority, Date/Time Opened, and Case Owner Alias.

 

How would I customize which columns show up and what order the columns are in?

 

Thanks.

I have an Apex Page that uses knowledge:articleList:

 

<knowledge:articleList articleVar="article" categories="BoxToneVersion:All" sortBy="mostViewed" pageSize="5">
<tr>
<td>{!article.articlenumber}</td>
<td><a target="_parent" href="{!URLFOR($Action.KnowledgeArticle.View, article.id)}">{!article.title}</a></td>
</tr>

</knowledge:articleList>

 In my customer portal, whenever I click on a link to a Knowledge Article, the link takes to me the article in the same tab. Is there a way to set it so that the article opens in a new tab? If so, how would I do that?

I have a Visualforce page where I am using knowledge:articleList to display a list of our knowledge articles sorted by the number of views.

 

However, articles older than 30 days are not displayed. This also happens in our Articles tab in our Customer Portal. Articles older than 30 days aren't displayed. Is there any way to turn this off and get the articles older than 30 days to be displayed?

 

I have a Apex Class that looks like this:

 

global with sharing class Component_Query {
    global String queryString {
        get;
        set;
    }
    
    global List results {
        get {
            List result = Database.Query(queryString);
            return result;
        } 
        set; 
    }
}
and a Apex Component that looks like this:
<apex:component controller="Component_Query" access="global">
  <apex:attribute name="QueryString" type="String" required="true" access="global" assignTo="{!queryString}"
    description="A valid SOQL query in string form." />
    
    <apex:variable value="{!results}" var="results"/>
    <apex:componentBody />
</apex:component>
My Visualforce page looks like this:
<apex:page >
    <apex:pageblock title="Recommended KB Articles">
        <apex:outputPanel layout="block">
        <ul>
        <apex:stylesheet value="{!URLFOR($Resource.custom_table_template)}"/>
            <table id="articles">
            <th id="number">Article Number</th>
            <th id="title">Article Name</th>
            <th id="label">Article Type</th>
            <th id="date">Last Published Date</th>
            <th id="label">Article ID</th>
            <th id="label">Article ID</th>
            <th id="label">Parent ID</th>
            <knowledge:articleList articleVar="article" sortBy="mostViewed" pageSize="5">
                <tr>
                <td>{!article.articlenumber}</td>
                <td><a target="_parent" href="{!URLFOR($Action.KnowledgeArticle.View, article.id)}">{!article.title}</a></td>
                <td>{!article.articletypelabel}</td>
                <td>{!article.lastpublisheddate}</td>
                <td>{!article.id}</td>
                <apex:variable var="articleid" value="{!article.id}"/>
                <td>{!articleid}</td>
                <td>
                <c:Query_component queryString="SELECT kavs.NormalizedScore, kavs.Id, kavs.ParentId FROM KnowledgeArticleViewStat kavs WHERE kavs.ParentId='{!articleid}'">
                    <apex:repeat value="{!results}" var="result">
                        {!result['ParentId']}
                    </apex:repeat>
                </c:Query_component>
                </td>
                </tr>
                
            </knowledge:articleList>
            </table>
        </ul>
    </apex:outputPanel>
    </apex:pageBlock>
</apex:page>
When I render my page in a browser, it looks like this:
How come my "Parent ID" column doesn't match up witht he KnowledgeArticle Ids? Is my foreign key incorrect or something? How do I get the KnowledgeArticleViewStat that is associated with the KnowledgeArticle?

I have a VisualForce Component that looks like this:

 

<ul>
    <apex:stylesheet value="{!URLFOR($Resource.custom_table_template)}"/>
        <table id="articles">
        <th id="number">Article Number</th>
        <th id="title">Article Name</th>
        <th id="label">Article Type</th>
        <th id="date">Last Published Date</th>
        <knowledge:articleList articleVar="article" sortBy="mostViewed" pageSize="5">
            <tr>
            <td>{!article.articlenumber}</td>
            <td><a target="_parent" href="{!URLFOR($Action.KnowledgeArticle.View, article.id)}">{!article.title}</a></td>
            <td>{!article.articletypelabel}</td>
            <td>{!article.lastpublisheddate}</td>
            </tr>
            
        </knowledge:articleList>
        </table>
    </ul>

How would I add a column that displays the "Most Viewed" of that article?

I have a Apex Page that looks like this:

    <apex:page showHeader="false" sidebar="false" standardController="News__c">
        <apex:stylesheet value="{!URLFOR($Resource.background_template)}"/>
        <apex:pageBlock title="News">
            <apex:outputField value="{!News__c.News__c}"/>
        </apex:pageBlock>
    </apex:page>

 

When it renders to the page, it looks like this:

 

How would I get it so that the News Block is lined up at the top with the stuff on the left? I want it to look like this:

 

I have a VisualForce component like this:

 

<apex:ListViews type="Case">
</apex:ListViews>

This displays a list of cases. How do I limit the number of cases that are displayed? I only want to display 5 cases in a list.

I have two HTML Home Page Custom Components title Custom_Articles and Custom_News.

 

Here's the HTML for them:

 

 <iframe src="/apex/NewsPage?id=a1TW0000000EJAL" frameborder="0" height="50%" width="100%"></iframe>&nbsp;

 

and

 

<iframe src="/apex/Custom_Home" frameborder="0" height="50%" width="100%"></iframe>&nbsp;

 

This is what my Customer Portal Home Page layout looks like:

 

Home Page Layout

 

and this is what the Custom Components look like when I login to the Customer Portal:

 

home page

 

How do I get rid of all the white space at the bottom of the components that is below the component border? Thanks.

I would like to build a custom page for the customer portal login. How would I do that?

 

I found this stuff after some googling:

http://brianpeddle.com/2011/06/06/building-a-custom-salesforce-login/

http://boards.developerforce.com/t5/Visualforce-Development/Customer-Portal-Login-Page-Customization/td-p/90188

but I don't really understand what's going on in those two posts. Is there a better tutorial somewhere else?

I want to embed videos in my knowledge articles, and I have been trying to follow the steps from these two posts:

http://boards.developerforce.com/t5/General-Development/Embedded-Video-in-New-Knowledge-Base/td-p/191514

http://success.salesforce.com/ideaView?id=087300000006n6v

 

Under Setup->Customize->Knowledge->Article Types, I have an article type of "Video Tutorial" with the title test_video_tutorial. I have a custom field called "Tutorial" with an API name of "Tutorial__c". 

 

In Article Management, I created a new article of type "Video Tutorial" and the Tutorial field I have this:

<div class="youtube">http://www.youtube.com/v/TDArzCNu178?</div>


 

In Setup->Develop->Pages, I created a new Visualforce Page called VideoTutorialPage like this:

<apex:page standardController="Video_Tutorials__kav" showHeader="true">
    <apex:outputPanel >
        <apex:outputField value="{!Video_Tutorials__kav.Title}"/>
        <apex:outputText escape="false" value="{!Video_Tutorials__kav.Tutorial__c}"/>
    </apex:outputPanel>
</apex:page>

However, when I click on the article "test_video_tutorial" in my Articles, the video doesn't get embedded. I just see the html code for it. Is there something I have to do to tell Salesforce that when I click on a Video Tutorial article, that it should use the Visualforce Page I created? What is it that I have to do to get the video to show up?

I have a VisualForce page that uses a custom controller. This is my controller:

 

global class CompanyCasesQuery {

    //constructors and variable declaration
    
    global List<Case> results {
        get {
            //returns a list of cases
            
            return results;
        } 
        set; 
    }
    
    public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>();
        options.add(new SelectOption('00BW0000000PeSVMA0','View All Open Cases'));
        options.add(new SelectOption('00BW0000000PbzWMAS','View All Cases'));
        options.add(new SelectOption('00BW0000000PeSGMA0','View All Closed Cases'));
        options.add(new SelectOption('00B300000005XQtEAM','Recently Viewed Cases'));
        return options;
    }
        
    public String[] getFilterId() {
        return filterid;
    }
        
    public void setFilterId(String[] filterid) {
        this.filterid = filterid;
    }
}

 

This is my VisualForce page:

 

<apex:page controller="CompanyCasesQuery" sidebar="true" showHeader="true">
    <apex:form >
        <apex:pageBlock title="My Cases">
              <apex:outputLabel value="View:"/>
              <apex:selectList value="{!filterId}" size="1">
                <apex:actionSupport event="onchange" action="{!results}" rerender="cases_table"/>
                <apex:selectOptions value="{!items}"/>
              </apex:selectList>
            <apex:pageBlock >
                <apex:pageBlockTable value="{!results}" var="c" rows="50" id="cases_table" >
                    <apex:column >
                        <a target="_parent" href="/{!c.id}">{!c.CaseNumber}</a>
                        <apex:facet name="header">Case Number</apex:facet>
                    </apex:column>
                </apex:pageBlockTable>
            </apex:pageBlock>
        </apex:pageBlock>
    </apex:form>
</apex:page>

The cases show up correctly and the select list shows up correctly. However, when I select an option in my select list, nothing happens. What I would like to have happen is when I select an option in the select list, my cases refresh like the default Salesforce cases page. When I select "View All Cases", all cases are displayed, when I select "View All Closed Cases", only closed cases are displayed. How do I get this select list refresh to work? Thanks.

 

  • October 02, 2012
  • Like
  • 0

I am trying to make a custom page in my Customer Portal that shows ALL the cases of an account instead of just that specific user's. I received some help from another user on this board and he recommended I do this in my custom controller:

 

    Id accountId = [SELECT Contact.AccountId FROM User WHERE Id = :UserInfo.getUserId()].Contact.AccountId;
    List<Case> results = [SELECT Id, CaseNumber FROM Case WHERE AccountId = :accountId];

 

However, this does not return ALL the cases for the user's account. This still only returns the cases that the user himself opened. I am looking to get a list of cases that other users that are part of the account have opened as well. What am I missing here? Thanks!

  • October 01, 2012
  • Like
  • 0

I am trying to make a custom page in my Customer Portal that shows ALL the cases of an account instead of just that specific user's. 

 

The SQL statement I am using in my VisualForce page to do this is:

 

    SELECT CaseNumber, AccountId, Subject FROM Case WHERE AccounttId = {!$User.AccountId}

 

However, I get this error:

 

    Error: Field AccountId does not exist. Check spelling 

 

How would I create this custom page that shows all cases?

  • September 25, 2012
  • Like
  • 0

I am trying to create a custom Visualforce page with a custom controller by following the example on this page:

http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_custom.htm

However, when I view the page that uses the code given in the example, I get this error:

List has no rows for assignment to SObject An unexpected error has occurred. Your development organization has been notified.

I just copied and pasted the code from the example into a custom class and a custom visualforce page. How do I fix this issue? Thanks!

  • September 24, 2012
  • Like
  • 0

I have a custom Cases apex page where I use a apex:pageBlockTable to display my list of Cases. Here is the code for it:

<apex:page standardController="Case" recordSetVar="Case" sidebar="true" showHeader="true">
    <apex:form >
        <apex:pageBlock title="Cases">
              <apex:outputLabel value="View:"/>
              <apex:selectList value="{!filterId}" size="1">
                <apex:actionSupport event="onchange" rerender="cases_table"/>
                <apex:selectOptions value="{!listviewoptions}"/>
              </apex:selectList>
            <apex:pageBlock >
                <apex:pageBlockButtons >
                </apex:pageBlockButtons>
                <apex:pageBlockTable value="{!case}" var="c" rows="50" id="cases_table" >
                    <apex:column >
                        <a target="_parent" href="{!URLFOR($Action.Case.View, c.id)}">{!c.CaseNumber}</a>
                        <apex:facet name="header">Case Number</apex:facet>
                    </apex:column>
                    <apex:column value="{!c.ContactId}" />
                    <apex:column value="{!c.Subject}" />
                    <apex:column value="{!c.Status}" />
                    <apex:column value="{!c.Priority}" />
                </apex:pageBlockTable>
            </apex:pageBlock>
        </apex:pageBlock>
    </apex:form>
    <base target="_parent"/>
</apex:page>

I would like to get a button inside my apex:pageBlockButtons like in the default Cases page. When the user clicks the button, I would like it to take the user to the new Cases page. I tried this:

<apex:commandButton action="{!new}" value="New"/>

but that gave me an error. How do I make a button that will take me to the new Cases page?

  • August 15, 2012
  • Like
  • 0

I have a custom Cases Apex page. I want to be able to display a list of cases and then be able link to the individual cases in each row like the default cases page. This is what I have so far:

 

<apex:page standardController="Case" recordSetVar="Case" tabstyle="Case" sidebar="true" showHeader="true">
    <apex:form >
        <apex:pageBlock >
            <apex:panelGrid columns="2">
              <apex:outputLabel value="View:"/>
              <apex:selectList value="{!filterId}" size="1">
                <apex:actionSupport event="onchange" rerender="cases_table"/>
                <apex:selectOptions value="{!listviewoptions}"/>
              </apex:selectList>
            </apex:panelGrid>
            <apex:pageBlockTable value="{!case}" var="c" rows="50" id="cases_table" >
                <apex:column value="{!c.CaseNumber}" />
                <apex:column value="{!c.ContactId}" />
                <apex:column value="{!c.Subject}" />
                <apex:column value="{!c.Status}" />
                <apex:column value="{!c.Priority}" />
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

However, no links are showing up in any of the rows. When I click an individual Case Number, nothing happens. How do I get links to each of the cases to show up? Thanks.

  • August 14, 2012
  • Like
  • 0

I have a Visualforce page where I am using knowledge:articleList to display a list of our knowledge articles sorted by the number of views.

 

However, articles older than 30 days are not displayed. This also happens in our Articles tab in our Customer Portal. Articles older than 30 days aren't displayed. Is there any way to turn this off and get the articles older than 30 days to be displayed?

 

I have a VisualForce Component that looks like this:

 

<ul>
    <apex:stylesheet value="{!URLFOR($Resource.custom_table_template)}"/>
        <table id="articles">
        <th id="number">Article Number</th>
        <th id="title">Article Name</th>
        <th id="label">Article Type</th>
        <th id="date">Last Published Date</th>
        <knowledge:articleList articleVar="article" sortBy="mostViewed" pageSize="5">
            <tr>
            <td>{!article.articlenumber}</td>
            <td><a target="_parent" href="{!URLFOR($Action.KnowledgeArticle.View, article.id)}">{!article.title}</a></td>
            <td>{!article.articletypelabel}</td>
            <td>{!article.lastpublisheddate}</td>
            </tr>
            
        </knowledge:articleList>
        </table>
    </ul>

How would I add a column that displays the "Most Viewed" of that article?

I have two HTML Home Page Custom Components title Custom_Articles and Custom_News.

 

Here's the HTML for them:

 

 <iframe src="/apex/NewsPage?id=a1TW0000000EJAL" frameborder="0" height="50%" width="100%"></iframe>&nbsp;

 

and

 

<iframe src="/apex/Custom_Home" frameborder="0" height="50%" width="100%"></iframe>&nbsp;

 

This is what my Customer Portal Home Page layout looks like:

 

Home Page Layout

 

and this is what the Custom Components look like when I login to the Customer Portal:

 

home page

 

How do I get rid of all the white space at the bottom of the components that is below the component border? Thanks.