• Megan Moody 10
  • NEWBIE
  • 45 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 14
    Replies
I'm trying to get the background color of my text template in a visual flow to be white. However, whenever I use standard HTML syntax it doesn't reflect on the output. 

I've tried putting it in a header
<h2 style="background-color:white">
Background-color set by using red
</h2>

I've tried putting the text inside a table and setting the color of the background of the table. 

Is this a limitation of text templates in visual flows? Or am I missing something obvious? 
I want to display the cases related list on the Home Page for my Community users. I can easily do this via a Visualforce page. The problem is that when the user clicks a case number to open the case, it opens the whole Salesforce instance in the home page frame (see screen shots for better understanding). I need it to either open only the case in that frame OR to launch a new tab with the case. Any ideas how I can acheived this? 

My Visualforce code:
 
<apex:page showHeader="false">
<apex:listViews type="Case"/> 
</apex:page>

Here's what it currently does when I click on the case number. 

User-added image

User-added image
 
Is it possible to NOT create a new record when an exact match isn't found in Salesforce when an end-user initiates a chat via Live Agent? We have a situation where it's 95% likely that person is in Salesforce, but an exact match is unlikely for a few reasons. We don't want our agents to have to close out the create a new contact tab each time.
I am a newbie at development. I have an Apex class and a Visualforce page that I need test coverage for. I just can't get complete code coverage. Any help in getting me closer to 100% code coverage for this is very much appreciated!

My Apex class:
public class ConciergeDisplayFamilyMembers
{ 
    public Contact currentContact {get;set;}     
    
    // Get Record Type ID for EE Consumer Contact records
       RecordType rtee = [select id from RecordType where SobjectType='Contact' and Name='EE Consumer' Limit 1];
    
    public List<Contact> Records
    {
        
        get
        {
            try
            {
                Records = new List<Contact>();
                Records =   [
                            SELECT Name,Gender__c,Subscriber_ID__c,Member_ID_suffix__c,Member_ID__c 
                            FROM Contact 
                            WHERE Subscriber_ID__c = :currentContact.Subscriber_ID__c
                               and Subscriber_ID__c != null
                               and Health_Plan__c = :currentContact.Health_Plan__c
                               and RecordTypeId = :rtee.id
                            ORDER BY Member_ID_suffix__c
                            ]; 
            } 
            catch (Exception ex)
            {
                  Records = null;
            }
            return Records;
        }
        private set;
    }
        

    public ConciergeDisplayFamilyMembers(ApexPages.StandardController sc)
    {
        if(!Test.isRunningTest()){
        sc.AddFields(new List<String>{'Subscriber_ID__c'});
        sc.AddFields(new List<String>{'Health_Plan__c'});
        currentContact = (Contact) sc.getRecord();     
        System.debug('***** ' + currentContact );
            }
    }

}


My Visualforce page:
<apex:page standardController="Contact" extensions="ConciergeDisplayFamilyMembers">
<style>
    span.EmployerIneligible
        {background-color:red; font-size:125%; font-weight:bold;}

    span.EmployeeEligible
        {background-color:#00FF00; font-size:125%; font-weight:bold;}    

    span.EmployeeIneligible
        {background-color:orange; font-size:125%; font-weight:bold;}
        
    span.CoverageDates
        {font-size:110%; font-weight:bold;}

        
</style>

<apex:pageBlock >

<apex:panelGrid >
    <apex:outputPanel rendered="{!Contact.Service_Status__c == 'Employer Not Eligible'}">
        <span class="EmployerIneligible">{!Contact.Service_Status__c}</span>
        
    </apex:outputPanel>
    
    <apex:outputPanel rendered="{!Contact.Service_Status__c == 'Employee Not Eligible'}">
        <span class="EmployeeIneligible">{!Contact.Service_Status__c}</span>
        <span class="CoverageDates">
                <apex:outputText value="{0, date, M'/'d'/'yyyy}">
                    <apex:param value="{!Contact.Coverage_Start_Date__c}" /> 
                </apex:outputText>
                <apex:outputText > - </apex:outputText>
                <apex:outputText value="{0, date, M'/'d'/'yyyy}">
                    <apex:param value="{!Contact.Coverage_End_Date__c}" /> 
                </apex:outputText>
              
        </span>    

    </apex:outputPanel>
    
    <apex:outputPanel layout="block" rendered="{!Contact.Service_Status__c == 'Eligible'}">
        <apex:panelGrid columns="2">
            <span class="EmployeeEligible">{!Contact.Service_Status__c}</span>
        
            
                <apex:outputText ><span class="CoverageDates">Days since last activity: &nbsp;&nbsp;&nbsp; <apex:outputField value="{!Contact.Days_Since_Last_Activity__c}"/></span></apex:outputText> 
            
            

            <apex:Outputtext ><b>HS Products:&nbsp;&nbsp;&nbsp;</b></apex:Outputtext>
            <apex:outputText ><p id="demo"></p></apex:outputText>
            
            
        </apex:panelGrid>
    </apex:outputPanel>
</apex:panelGrid>
 
</apex:pageBlock>

    <apex:pageBlock title="Family Members"> 
        <apex:pageBlockTable value="{!Records}" var="Record" > 
            <apex:column > 
                <apex:facet name="header">Name</apex:facet> 
                <apex:outputLink target="_self" value="{!Record.ID}">{!Record.Name}</apex:outputlink>
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Member ID</apex:facet> 
                <apex:outputText value="{!Record.Member_ID__c}"/> 
            </apex:column>
            <apex:column > 
                <apex:facet name="header">suffix</apex:facet> 
                <apex:outputText value="{!Record.Member_ID_suffix__c}"/> 
            </apex:column>  
            <apex:column > 
                <apex:facet name="header">Gender</apex:facet> 
                <apex:outputText value="{!Record.Gender__c}"/> 
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Subscriber ID</apex:facet> 
                <apex:outputText value="{!Record.Subscriber_ID__c}"/> 
            </apex:column> 
        </apex:pageBlockTable> 
    </apex:pageBlock>
    
    
        
        <apex:relatedList list="Cases"/>
        
    

<script>
    var myString = '{!Contact.Account.Concierge_HS_Products__c}';
    var res = myString.replace(new RegExp(';', 'g'), '<br/>');
    document.getElementById("demo").innerHTML =res;       
</script>


</apex:page>
Here's the test class I've written. It only gets 23% code coverage:
@isTest
private class TestConciergeDisplayFamilyMembers{


    public static testmethod void testConciergeDisplayFamilyMembers(){
        
        // Get Record Type ID for EE Consumer Contact records
       RecordType rtee = [select id from RecordType where SobjectType='Contact' and Name='EE Consumer' Limit 1];
      RecordType rthp = [select id from RecordType where SobjectType='Account' and Name='Customer - Health Plan' Limit 1];
      RecordType rtemp = [select id from RecordType where SobjectType='Account' and Name='Customer - Employer' Limit 1];
        
        //Create Employer Account
        Account objAccount = New Account();
        objAccount.Name = 'Test Employer Account';
        objAccount.Type = 'Customer';
        objAccount.Customer_Type__c = 'Employer'; 
        objAccount.RecordTypeId = rtemp.id;
        objAccount.generated_from_leads__c = true;
        Insert objAccount;
    
        Account empAccount = objAccount;
        
        //Create Health Plan Account
        Account objAccountHP = New Account();
        objAccountHP.Name = 'Test Health Plan';
        objAccountHP.Type = 'Customer';
        objAccount.Customer_Type__c = 'Health Plan'; 
        objAccountHP.RecordTypeId = rthp.id;
        objAccountHP.generated_from_leads__c = true;
        Insert objAccountHP;
        
        Account hpAccount = objAccountHP;
        
        //Create Contacts with same subscriber number
        List<Contact> objContact = new List<Contact>();
        for (integer j=0;j<3;j++){
             objContact.add(new Contact(FirstName='Test' + j,
                                 LastName='Test' +j,
                                AccountId= empAccount.Id,
                                Subscriber_ID__c = '11111',
                                RecordTypeId = rtee.id,
                                Health_Plan__c = hpAccount.Id,
                                Member_ID__c = '1'));
                    }
        insert objContact;
        
        //Create Contacts with different subscriber number
        List<Contact> objContact2= new List<Contact>();
        for (integer j=10;j<15;j++){
             objContact2.add(new Contact(FirstName='Test' + j,
                                 LastName='Test' +j,
                                AccountId= objAccount.Id,
                                Subscriber_ID__c = '1234',
                                RecordTypeId = rtee.id,
                                Health_Plan__c = objAccountHP.Id,
                                Member_ID__c = '1'));
          }
        insert objContact2;
        
        //Get the ID of the first contact created
        Contact firstContact = [SELECT ID, firstname,Subscriber_ID__c, Member_ID__c FROM Contact WHERE ID = :objContact[0].Id];
        system.debug('first contact: ' + firstContact.ID + ' ' + firstContact.FirstName);
          
        PageReference myVfPage = Page.Concierge_Service_Status;
        Test.setCurrentPage(myVfPage);
        ConciergeDisplayFamilyMembers testFamily = new ConciergeDisplayFamilyMembers(new ApexPages.StandardController(firstContact));
        ApexPages.StandardController sc = new ApexPages.StandardController(firstContact);
          //ConciergeDisplayFamilyMembers testFamily = new ConciergeDisplayFamilyMembers(sc);
        Contact primaryContact = testFamily.currentContact;
        }

}
 
I'm trying to deploy some changes to a trigger, which is just a reduction in the amount of code in that trigger.
The code coverage in the Sandbox is 79%. All triggers have >1%.
User-added image

The code coverage in Production is 88%.
User-added image

When I validate my inbound change set in Production, it says there's only 64% code coverage in the Sandbox. 
User-added image

What could be the problem? The trigger I'm updating has 100% coverage in the Sandbox and I do have the updated test class for it in the inbound change set. I don't know what else to look into. These triggers (not written by me and implemented long ago) have functionality that we don't use and that is causing an inability to use workflow rules and process builder flows. Ideas? 
I am trying to write a unit test that tests the apex class used by a VF page. My list is returning no items even though my query should be valid. 

The system.debug statement shows that the ID for the contact does exist. Any ideas why my query (right below the system.debug line at the top) is returning no rows? 
System.runAs(testUser){
            system.debug('objContact ID ' + objContact[0].id);
            Contact firstContact = [SELECT ID, firstname, Subscriber_ID__c, Member_ID__c 
                                    FROM Contact 
                                    WHERE ID = :objContact[0].id];
            ConciergeDisplayFamilyMembers testFamily = new ConciergeDisplayFamilyMembers(new ApexPages.StandardController(firstContact));
            ApexPages.StandardController sc = new ApexPages.StandardController(firstContact);
        	Contact primaryContact = testFamily.currentContact;
        	System.assertNotEquals(null, primaryContact);
        }
I have a VF page where I list family members of the contact who has been opened in the center console. This VF page is displayed as a side bar in the console. When the user clicks on the link to open the family member, it opens within the middle of the console. I'd like it to open the contact next to the original contact. It should make more sense in the screen shot.
  • The agent searches for and opens the service console for the contact Joffrey Lanister. 
  • Joffrey's details appear in the center of the console. The highlights panel (with very minimal information) is above it. 
  • The agent clicks on his mother, Cersei Lannister, from the right-side panel, which is a VF page. 
  • Right now the page is opening Cersei within the center console, as a subtab of Joffrey(where her name is highlighted in yellow). What I want is for Cersei to be opened as a primary tab next to Joffrey (where there's yellow highlighting with no tab open).  
User-added image

Does anyone know if I can do this? Here's the chunk of code from my VF page that is building the related list to display in the Family Members section.
 
</apex:pageBlock>

    <apex:pageBlock title="Family Members"> 
        <apex:pageBlockTable value="{!Records}" var="Record" > 
            <apex:column > 
                <apex:facet name="header">Name</apex:facet> 
                <apex:outputLink value="{!Record.ID}">{!Record.Name}</apex:outputlink>
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Member ID</apex:facet> 
                <apex:outputText value="{!Record.Member_ID__c}"/> 
            </apex:column>
            <apex:column > 
                <apex:facet name="header">suffix</apex:facet> 
                <apex:outputText value="{!Record.Member_ID_suffix__c}"/> 
            </apex:column>  
            <apex:column > 
                <apex:facet name="header">Gender</apex:facet> 
                <apex:outputText value="{!Record.Gender__c}"/> 
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Subscriber ID</apex:facet> 
                <apex:outputText value="{!Record.Subscriber_ID__c}"/> 
            </apex:column> 
        </apex:pageBlockTable> 
    </apex:pageBlock>

I tried adding a target value of _top and _parent, but neither of those worked. 

<apex:outputLink target="_top" value="{!Record.ID}">{!Record.Name}</apex:outputlink>

Any help is much appreciated. 
I have created three workflow rules - all doing field updates on the Opportunity Product - that execute against the Opportunity Product. There is also an Apex trigger coded for the Opportunity Product (that I did not code). Two of the workflow rules work just fine. However, when the third one is active, it causes some behavior that is different related to the Apex trigger. 

After combing through the debug logs, the most glaring difference is that when the WFRs are executed, the successful test (i.e. with only two active) has a CODE_UNIT_FINISHED entry at the end of the group. When the unsuccessful WFR is added, the CODE_UNIT_FINISHED entry does not appear until the end of the log file. 

Also, the unsuccessful WFR does work in terms of updating the field it should be updating. The problem is that it breaks when the user enters values that prompt the logic in the trigger. 

I'm hoping someone might be able to tell me why the CODE_UNIT_FINSHED for the workflow rules could change based on the activation/deactivation of one workflow rule. 

The pattern for a successful run is:
CODE_UNIT_STARTED - Triggers
CODE_UNIT_STARTED - OpportunityProductTrigger (before insert)
CODE_UNIT_FINISHED - OpportunityProductTrigger (before insert)
CODE_UNIT_STARTED - OpportunityProductTrigger (after insert)
CODE_UNIT_FINISHED - OpportunityProductTrigger (after insert)
CODE_UNIT_STARTED - Workflow:OpportunityLineItem
CODE_UNIT_FINISHED - Workflow:OpportunityLineItem
CODE_UNIT_STARTED - OpportunityTrigger (before update)
CODE_UNIT_FINISHED - OpportunityTrigger (before update)
CODE_UNIT_STARTED - Validation:Opportunity
CODE_UNIT_FINISHED - Validation:Opportunity
CODE_UNIT_STARTED - OpportunityTrigger (after update)
CODE_UNIT_FINISHED - OpportunityTrigger (after update)
CODE_UNIT_STARTED - OpportunityCompetitionTrigger (after update)
CODE_UNIT_FINISHED - OpportunityCompetitionTrigger (after update)
CODE_UNIT_STARTED - Workflow:Opportunity
CODE_UNIT_FINISHED - Workflow:Opportunity
CODE_UNIT_FINISHED - Triggers

The pattern for the unsuccessful run is this:
CODE_UNIT_STARTED - Triggers
CODE_UNIT_STARTED - OpportunityProductTrigger (before insert)
CODE_UNIT_FINISHED - OpportunityProductTrigger (before insert)
CODE_UNIT_STARTED - OpportunityProductTrigger (after insert)
CODE_UNIT_FINISHED - OpportunityProductTrigger (after insert)
CODE_UNIT_STARTED - Workflow:OpportunityLineItem
CODE_UNIT_FINISHED - Workflow:OpportunityLineItem
CODE_UNIT_STARTED - OpportunityTrigger (before update)
CODE_UNIT_FINISHED - OpportunityTrigger (before update)
CODE_UNIT_FINISHED - Workflow:OpportunityLineItem
CODE_UNIT_FINISHED - Triggers

I've attached screen shots. 

User-added imageUser-added image
I have a simple pageblocksection in my VF page in which I went to display a contact's associated Account record and then a custom lookup field. The problem is that when I display the contact's associated account, it doesn't provide a hyperlink to the account as it does for my custom lookup field.

User-added image

I can get the Account to become a hyperlink by using the outputLink tag, but then I don't have a label next to it. 

User-added image

Is there anyway to display a label next to the linked Account Name such that it looks like the label "Health Plan" below it? 

 
I'd like to make the display of the selected multi select picklist items more visually friendly in my VF page. Selected values are displayed by dfault like "option 1; option 2; option 6". I'd like it to display in a vertical list like so:

option 1
option 2
option 6

This is only for display purposes. The user doesn't need to add or remove values from the picklist. Is there a way to do this in a VF page? Thanks!
I have a VF page in a Service Cloud console. I want it to display all other contacts with the same value in a custom field of the current contact. For some reason my Apex class won't get the current contact record. My two code snippets are below. Anyone with ideas as to why this isn't working? Any help is much appreciated. 
 
public class ConciergeDisplayFamilyMembers
{ 
    public Contact currentContact {get;set;}
    
    public List<Contact> Records
    {
        get
        {
            try
            {
                Records = new List<Contact>();
                Records = [SELECT Name,Gender__c,Subscriber_ID__c,Member_ID_suffix__c,Member_ID__c FROM Contact WHERE Subscriber_ID__c = :currentContact.Subscriber_ID__c AND RecordTypeId = '012q00000004SAiAAM']; 
            } 
            catch (Exception ex)
                {
                Records = null;
                }
                return Records;
        }
        private set;
        }
        

    public ConciergeDisplayFamilyMembers(ApexPages.StandardController sc)
    {
        currentContact = (Contact) sc.getRecord();
    }

}
 
<apex:page standardController = "Contact" extensions="ConciergeDisplayFamilyMembers"> 
    <apex:pageBlock > 
        <apex:pageBlockTable value="{!Records}" var="Record"> 
            <apex:column > 
                <apex:facet name="header">Name</apex:facet> 
                <apex:outputText value="{!Record.Name}"/> 
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Member ID</apex:facet> 
                <apex:outputText value="{!Record.Member_ID__c}"/> 
            </apex:column>
            <apex:column > 
                <apex:facet name="header">suffix</apex:facet> 
                <apex:outputText value="{!Record.Member_ID_suffix__c}"/> 
            </apex:column>  
            <apex:column > 
                <apex:facet name="header">Gender</apex:facet> 
                <apex:outputText value="{!Record.Gender__c}"/> 
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Subscriber ID</apex:facet> 
                <apex:outputText value="{!Record.Subscriber_ID__c}"/> 
            </apex:column> 
        </apex:pageBlockTable> 
    </apex:pageBlock> 
</apex:page>

In the apex class, if I leave out the part of the WHERE clause that is searching for the custom field value (
WHERE Subscriber_ID__c = :currentContact.Subscriber_ID__c) and just search on the record type, it returns records. But with the Subscriber_ID__c field, it never returns any records. 
I'm a novice at Apex and VF development. I'm just trying to create a VF page that displays all contact records where a particular field equals a value from the current record, which is a contact record. 

My VF code is using this apex controller code. I am getting a blank back in the Subscriber_ID__c value. 

I'm surely missing a simple step in my code. Can anyone help?

public with sharing class ConciergeDisplayFamilyMembers

    public String subscriberID {get;set;}
    public List<Contact> Records {get; set;} 
    
    public ConciergeDisplayFamilyMembers()
    { 
        Records = 
            [SELECT Name,Gender__c,Subscriber_ID__c,Member_ID_suffix__c,Member_ID__c FROM Contact WHERE Subscriber_ID__c = :subscriberID]; 
    } 

public ConciergeDisplayFamilyMembers(ApexPages.StandardController sc)    
    {            
    subscriberID = ApexPages.CurrentPage().getparameters().get('Subscriber_ID__c');
    }
}
 
I'm trying to get the background color of my text template in a visual flow to be white. However, whenever I use standard HTML syntax it doesn't reflect on the output. 

I've tried putting it in a header
<h2 style="background-color:white">
Background-color set by using red
</h2>

I've tried putting the text inside a table and setting the color of the background of the table. 

Is this a limitation of text templates in visual flows? Or am I missing something obvious? 
I want to display the cases related list on the Home Page for my Community users. I can easily do this via a Visualforce page. The problem is that when the user clicks a case number to open the case, it opens the whole Salesforce instance in the home page frame (see screen shots for better understanding). I need it to either open only the case in that frame OR to launch a new tab with the case. Any ideas how I can acheived this? 

My Visualforce code:
 
<apex:page showHeader="false">
<apex:listViews type="Case"/> 
</apex:page>

Here's what it currently does when I click on the case number. 

User-added image

User-added image
 
I am a newbie at development. I have an Apex class and a Visualforce page that I need test coverage for. I just can't get complete code coverage. Any help in getting me closer to 100% code coverage for this is very much appreciated!

My Apex class:
public class ConciergeDisplayFamilyMembers
{ 
    public Contact currentContact {get;set;}     
    
    // Get Record Type ID for EE Consumer Contact records
       RecordType rtee = [select id from RecordType where SobjectType='Contact' and Name='EE Consumer' Limit 1];
    
    public List<Contact> Records
    {
        
        get
        {
            try
            {
                Records = new List<Contact>();
                Records =   [
                            SELECT Name,Gender__c,Subscriber_ID__c,Member_ID_suffix__c,Member_ID__c 
                            FROM Contact 
                            WHERE Subscriber_ID__c = :currentContact.Subscriber_ID__c
                               and Subscriber_ID__c != null
                               and Health_Plan__c = :currentContact.Health_Plan__c
                               and RecordTypeId = :rtee.id
                            ORDER BY Member_ID_suffix__c
                            ]; 
            } 
            catch (Exception ex)
            {
                  Records = null;
            }
            return Records;
        }
        private set;
    }
        

    public ConciergeDisplayFamilyMembers(ApexPages.StandardController sc)
    {
        if(!Test.isRunningTest()){
        sc.AddFields(new List<String>{'Subscriber_ID__c'});
        sc.AddFields(new List<String>{'Health_Plan__c'});
        currentContact = (Contact) sc.getRecord();     
        System.debug('***** ' + currentContact );
            }
    }

}


My Visualforce page:
<apex:page standardController="Contact" extensions="ConciergeDisplayFamilyMembers">
<style>
    span.EmployerIneligible
        {background-color:red; font-size:125%; font-weight:bold;}

    span.EmployeeEligible
        {background-color:#00FF00; font-size:125%; font-weight:bold;}    

    span.EmployeeIneligible
        {background-color:orange; font-size:125%; font-weight:bold;}
        
    span.CoverageDates
        {font-size:110%; font-weight:bold;}

        
</style>

<apex:pageBlock >

<apex:panelGrid >
    <apex:outputPanel rendered="{!Contact.Service_Status__c == 'Employer Not Eligible'}">
        <span class="EmployerIneligible">{!Contact.Service_Status__c}</span>
        
    </apex:outputPanel>
    
    <apex:outputPanel rendered="{!Contact.Service_Status__c == 'Employee Not Eligible'}">
        <span class="EmployeeIneligible">{!Contact.Service_Status__c}</span>
        <span class="CoverageDates">
                <apex:outputText value="{0, date, M'/'d'/'yyyy}">
                    <apex:param value="{!Contact.Coverage_Start_Date__c}" /> 
                </apex:outputText>
                <apex:outputText > - </apex:outputText>
                <apex:outputText value="{0, date, M'/'d'/'yyyy}">
                    <apex:param value="{!Contact.Coverage_End_Date__c}" /> 
                </apex:outputText>
              
        </span>    

    </apex:outputPanel>
    
    <apex:outputPanel layout="block" rendered="{!Contact.Service_Status__c == 'Eligible'}">
        <apex:panelGrid columns="2">
            <span class="EmployeeEligible">{!Contact.Service_Status__c}</span>
        
            
                <apex:outputText ><span class="CoverageDates">Days since last activity: &nbsp;&nbsp;&nbsp; <apex:outputField value="{!Contact.Days_Since_Last_Activity__c}"/></span></apex:outputText> 
            
            

            <apex:Outputtext ><b>HS Products:&nbsp;&nbsp;&nbsp;</b></apex:Outputtext>
            <apex:outputText ><p id="demo"></p></apex:outputText>
            
            
        </apex:panelGrid>
    </apex:outputPanel>
</apex:panelGrid>
 
</apex:pageBlock>

    <apex:pageBlock title="Family Members"> 
        <apex:pageBlockTable value="{!Records}" var="Record" > 
            <apex:column > 
                <apex:facet name="header">Name</apex:facet> 
                <apex:outputLink target="_self" value="{!Record.ID}">{!Record.Name}</apex:outputlink>
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Member ID</apex:facet> 
                <apex:outputText value="{!Record.Member_ID__c}"/> 
            </apex:column>
            <apex:column > 
                <apex:facet name="header">suffix</apex:facet> 
                <apex:outputText value="{!Record.Member_ID_suffix__c}"/> 
            </apex:column>  
            <apex:column > 
                <apex:facet name="header">Gender</apex:facet> 
                <apex:outputText value="{!Record.Gender__c}"/> 
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Subscriber ID</apex:facet> 
                <apex:outputText value="{!Record.Subscriber_ID__c}"/> 
            </apex:column> 
        </apex:pageBlockTable> 
    </apex:pageBlock>
    
    
        
        <apex:relatedList list="Cases"/>
        
    

<script>
    var myString = '{!Contact.Account.Concierge_HS_Products__c}';
    var res = myString.replace(new RegExp(';', 'g'), '<br/>');
    document.getElementById("demo").innerHTML =res;       
</script>


</apex:page>
Here's the test class I've written. It only gets 23% code coverage:
@isTest
private class TestConciergeDisplayFamilyMembers{


    public static testmethod void testConciergeDisplayFamilyMembers(){
        
        // Get Record Type ID for EE Consumer Contact records
       RecordType rtee = [select id from RecordType where SobjectType='Contact' and Name='EE Consumer' Limit 1];
      RecordType rthp = [select id from RecordType where SobjectType='Account' and Name='Customer - Health Plan' Limit 1];
      RecordType rtemp = [select id from RecordType where SobjectType='Account' and Name='Customer - Employer' Limit 1];
        
        //Create Employer Account
        Account objAccount = New Account();
        objAccount.Name = 'Test Employer Account';
        objAccount.Type = 'Customer';
        objAccount.Customer_Type__c = 'Employer'; 
        objAccount.RecordTypeId = rtemp.id;
        objAccount.generated_from_leads__c = true;
        Insert objAccount;
    
        Account empAccount = objAccount;
        
        //Create Health Plan Account
        Account objAccountHP = New Account();
        objAccountHP.Name = 'Test Health Plan';
        objAccountHP.Type = 'Customer';
        objAccount.Customer_Type__c = 'Health Plan'; 
        objAccountHP.RecordTypeId = rthp.id;
        objAccountHP.generated_from_leads__c = true;
        Insert objAccountHP;
        
        Account hpAccount = objAccountHP;
        
        //Create Contacts with same subscriber number
        List<Contact> objContact = new List<Contact>();
        for (integer j=0;j<3;j++){
             objContact.add(new Contact(FirstName='Test' + j,
                                 LastName='Test' +j,
                                AccountId= empAccount.Id,
                                Subscriber_ID__c = '11111',
                                RecordTypeId = rtee.id,
                                Health_Plan__c = hpAccount.Id,
                                Member_ID__c = '1'));
                    }
        insert objContact;
        
        //Create Contacts with different subscriber number
        List<Contact> objContact2= new List<Contact>();
        for (integer j=10;j<15;j++){
             objContact2.add(new Contact(FirstName='Test' + j,
                                 LastName='Test' +j,
                                AccountId= objAccount.Id,
                                Subscriber_ID__c = '1234',
                                RecordTypeId = rtee.id,
                                Health_Plan__c = objAccountHP.Id,
                                Member_ID__c = '1'));
          }
        insert objContact2;
        
        //Get the ID of the first contact created
        Contact firstContact = [SELECT ID, firstname,Subscriber_ID__c, Member_ID__c FROM Contact WHERE ID = :objContact[0].Id];
        system.debug('first contact: ' + firstContact.ID + ' ' + firstContact.FirstName);
          
        PageReference myVfPage = Page.Concierge_Service_Status;
        Test.setCurrentPage(myVfPage);
        ConciergeDisplayFamilyMembers testFamily = new ConciergeDisplayFamilyMembers(new ApexPages.StandardController(firstContact));
        ApexPages.StandardController sc = new ApexPages.StandardController(firstContact);
          //ConciergeDisplayFamilyMembers testFamily = new ConciergeDisplayFamilyMembers(sc);
        Contact primaryContact = testFamily.currentContact;
        }

}
 
I have a simple pageblocksection in my VF page in which I went to display a contact's associated Account record and then a custom lookup field. The problem is that when I display the contact's associated account, it doesn't provide a hyperlink to the account as it does for my custom lookup field.

User-added image

I can get the Account to become a hyperlink by using the outputLink tag, but then I don't have a label next to it. 

User-added image

Is there anyway to display a label next to the linked Account Name such that it looks like the label "Health Plan" below it? 

 
I'd like to make the display of the selected multi select picklist items more visually friendly in my VF page. Selected values are displayed by dfault like "option 1; option 2; option 6". I'd like it to display in a vertical list like so:

option 1
option 2
option 6

This is only for display purposes. The user doesn't need to add or remove values from the picklist. Is there a way to do this in a VF page? Thanks!
I have a VF page in a Service Cloud console. I want it to display all other contacts with the same value in a custom field of the current contact. For some reason my Apex class won't get the current contact record. My two code snippets are below. Anyone with ideas as to why this isn't working? Any help is much appreciated. 
 
public class ConciergeDisplayFamilyMembers
{ 
    public Contact currentContact {get;set;}
    
    public List<Contact> Records
    {
        get
        {
            try
            {
                Records = new List<Contact>();
                Records = [SELECT Name,Gender__c,Subscriber_ID__c,Member_ID_suffix__c,Member_ID__c FROM Contact WHERE Subscriber_ID__c = :currentContact.Subscriber_ID__c AND RecordTypeId = '012q00000004SAiAAM']; 
            } 
            catch (Exception ex)
                {
                Records = null;
                }
                return Records;
        }
        private set;
        }
        

    public ConciergeDisplayFamilyMembers(ApexPages.StandardController sc)
    {
        currentContact = (Contact) sc.getRecord();
    }

}
 
<apex:page standardController = "Contact" extensions="ConciergeDisplayFamilyMembers"> 
    <apex:pageBlock > 
        <apex:pageBlockTable value="{!Records}" var="Record"> 
            <apex:column > 
                <apex:facet name="header">Name</apex:facet> 
                <apex:outputText value="{!Record.Name}"/> 
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Member ID</apex:facet> 
                <apex:outputText value="{!Record.Member_ID__c}"/> 
            </apex:column>
            <apex:column > 
                <apex:facet name="header">suffix</apex:facet> 
                <apex:outputText value="{!Record.Member_ID_suffix__c}"/> 
            </apex:column>  
            <apex:column > 
                <apex:facet name="header">Gender</apex:facet> 
                <apex:outputText value="{!Record.Gender__c}"/> 
            </apex:column> 
            <apex:column > 
                <apex:facet name="header">Subscriber ID</apex:facet> 
                <apex:outputText value="{!Record.Subscriber_ID__c}"/> 
            </apex:column> 
        </apex:pageBlockTable> 
    </apex:pageBlock> 
</apex:page>

In the apex class, if I leave out the part of the WHERE clause that is searching for the custom field value (
WHERE Subscriber_ID__c = :currentContact.Subscriber_ID__c) and just search on the record type, it returns records. But with the Subscriber_ID__c field, it never returns any records. 
I'm a novice at Apex and VF development. I'm just trying to create a VF page that displays all contact records where a particular field equals a value from the current record, which is a contact record. 

My VF code is using this apex controller code. I am getting a blank back in the Subscriber_ID__c value. 

I'm surely missing a simple step in my code. Can anyone help?

public with sharing class ConciergeDisplayFamilyMembers

    public String subscriberID {get;set;}
    public List<Contact> Records {get; set;} 
    
    public ConciergeDisplayFamilyMembers()
    { 
        Records = 
            [SELECT Name,Gender__c,Subscriber_ID__c,Member_ID_suffix__c,Member_ID__c FROM Contact WHERE Subscriber_ID__c = :subscriberID]; 
    } 

public ConciergeDisplayFamilyMembers(ApexPages.StandardController sc)    
    {            
    subscriberID = ApexPages.CurrentPage().getparameters().get('Subscriber_ID__c');
    }
}
 
Is it possible to create a custom link in a search result list? What I want is to remove the "Del" action link (I know how to do this) and replace it with a custom link "DNE" which will have an action attached to it that will create an activity logging that a call was received rom a DNE client. Basically, I want to save my reps the time of clicking into the record and logging an activity if they see the "Rep Do Not Engage" flag is true. Is this possible?


User-added image