function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
John Eichsteadt 1John Eichsteadt 1 

I'm having a problem getting this VF page to display the relsults I'm looking for.

Query is returning the correct results in the Dev Console, but page table is blank.

APEX Class:
public class ContactUnitListController
{
  private ApexPages.StandardController controller {get; set;}
  private Contact a;
  public List<Account> ua;
  
  public ContactUnitListController(ApexPages.StandardController controller)
  {
    this.controller=controller;
    this.a = (Contact)Controller.getRecord();
  }
  
  public List<Account>getUnitList()
  {
    try
    {
      AccountContactRelation[] rel = [SELECT AccountId 
                           FROM AccountContactRelation
                           WHERE ContactId = :a.Id 
                           AND IsActive = true
                           ORDER BY CreatedDate DESC];
                           
      ua = [SELECT Id,Name,Property__c,Property__r.Name
        FROM Account 
        WHERE ParentId = :rel[0].AccountId 
        AND RecordTypeId = '0121a000000QCRBAA4' 
        ORDER BY CreatedDate DESC];
        
      return ua;
    }
    catch(Exception e)
        {
            system.debug('@@@@@@@@@@@@@@@@@@@@@'+e.getMessage()+' on line '+e.getLineNumber());
            
            return ua;
        }
    }
}

VF Page:

<apex:page docType="html-5.0" standardController="Contact" extensions="ContactUnitListController" showHeader="false" sidebar="false">        <apex:includeScript value="{!$Resource.json3}" />
 <body>
<apex:pageBlock title="Deeded Units">
<apex:pageBlockTable value="{!UnitList}" var="unit">
<apex:column >
<apex:facet name="header">Unit Number</apex:facet>
<apex:outputLink target="_blank" value="/{!unit.Id}">{!unit.Name}</apex:outputLink>
</apex:column>
<apex:column >
<apex:facet name="header">Property</apex:facet>
<apex:outputLink target="_blank" value="/{!unit.Property__c}">{!unit.Property__r.Name}</apex:outputLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</body>
</apex:page>

Can anyone tell me what I'm missing here? I'm guessing it's something simple.