Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6652289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:07:07+00:00 2026-05-26T01:07:07+00:00

i have a class public with sharing class CAccountRep { string sageAccountNo {get;set;} string

  • 0

i have a class

public with sharing class CAccountRep {
string sageAccountNo {get;set;}
string clientName {get;set;}
string name {get;set;}
integer noofdays {get;set;}
string billableUnits {get;set;}
decimal dailyChargeRate {get;set;}
string nominalCode {get;set;}
string practice {get;set;}
string taxFlag {get;set;}
string ProjectId {get;set;}
string PONumber {get;set;}

public CAccountRep(String CrSageAc,String CrClientN,string CrName,integer Crnoofdays,string crbillableunits,decimal CrDecimalChargeRate,string crNominalCode,string CrPractice, String CrTaxFlag,String CrProjectId, String CrPONumber)
{
    sageAccountNo=CrSageAc;
    clientName=CrClientN;
    name=CrName;
    noofdays=Crnoofdays;
    billableUnits=crbillableunits;
    dailyChargeRate=CrDecimalChargeRate;
    nominalCode=crNominalCode;
    practice=CrPractice;
    taxFlag=CrTaxFlag;
    ProjectId=CrProjectId;
    PONumber=CrPONumber;

}

    }

Iam creating a object of this class and passing out the parameters into this class

   public List<CAccountRep> AR { get;set; }

   public list<CAccountRep> getAR()
   {   
    if(AR!= null)
        return AR ;
    else return null;
   }

   Using the follwing code to create the object of the class

     CAccountRep CRep=new CAccountRep(projectList[0].Sage_Account_Number__c,projectList[0].Client_Name__c, Cname,enoOfBillableDays,projectList[0].BillableUnits__c,AssConlist[0].Daily_Charge_Rate_of_Consultant__c,AssConlist[0].Nominal_Code__c,projectList[0].C85_Practice__c,projectList[0].Tax_Flag__c,projectList[0].Project_ID__c,projectList[0].PO_Number__c);

     AR.add(CRep);

In my VF page i am trying to display the contents of the list AR.

But i get an error Unknown Propery CAccountRep.ProjectId while saving the VF page.

<table id="tableRep">
   <apex:repeat id="tc" value="{!AR}" var="TCrep">
   <tr>

   <td>{!TCrep.ProjectId}</td>
   </tr>
   </apex:repeat>
   </table>

I can get the output like this if i just give {!TCrep}

CAccountRep:[PONumber=null, ProjectId=C85_JPMC1 _A-0083, billableUnits=null, clientName=001A000000YJFhdIAH, dailyChargeRate=null, name=Change Order 10002011-09-05 to 2011-10-10 : 0 null, nominalCode=null, noofdays=0, practice=Administration, sageAccountNo=null, taxFlag=null]
CAccountRep:[PONumber=null, ProjectId=C85_BBCWW _A-0084, billableUnits=null, clientName=001A000000cwgIlIAI, dailyChargeRate=null, name=Secure Desktop v012011-09-05 to 2011-10-10 : 0 null, nominalCode=null, noofdays=0, practice=null, sageAccountNo=null, taxFlag=null]
CAccountRep:[PONumber=null, ProjectId=C85_JPMC1 _A-0083, billableUnits=null, clientName=001A000000YJFhdIAH, dailyChargeRate=null, name=Change Order 10002011-09-05 to 2011-10-10 : 0 null, nominalCode=null, noofdays=0, practice=Administration, sageAccountNo=null, taxFlag=null]

Any ideas on how to get it display correctly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:07:08+00:00Added an answer on May 26, 2026 at 1:07 am

    I think the compiler is getting confused because you have 2 public getters in it’s opinion i.e. both of these lines:

    public List<CAccountRep> AR { get;} // just removed set; for now
    
    public list<CAccountRep> getAR()
    

    Would be called from a Visualforce page when you use the following syntax in the page:

    {!AR}
    

    Try doing this instead:

    public List<CAccountRep> AR { get{
        return AR ; // if AR is null it returns null so the if statement was redundant
    
    }set; }
    

    And remove the getAR() method. You should also mark the class member variables that you’d like to be visible as public e.g.

    public string ProjectId {get;set;}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

public with sharing class xml4 { public string x{get;set;} public string c{get;set;} List<ArtemisVC__Company_View_Extensions__c> mcs{get;
I have class public class Chat { public string Ip { get; set; }
I have this class: public MyClass { public void initialize(Collection<String> data) { this.data =
I have such class public unsafe class EigenSolver { public double* aPtr {get; private
I have been sharing database variables using the following code: Namespace DataAccessVariables Public Class
I have the following code: public class boolq { public static void main(String[] args)
I have class A: public class ClassA<T> Class B derives from A: public class
I have class A: public B { ...} vector<A*> v; I want to do
I have class Fred { public: void inspect() const {}; void modify(){}; }; int
I have following class public class ButtonChange { private int _buttonState; public void SetButtonState(int

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.