• Rohit Kumar Malik
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies

I know this is weird I can achieve this using Roll up summary .But what I want is to achieve this using trigger.

 

I want to write a trigger on Account ,which is having a field named Count__c .I want to autopopulate the nos of Contacts associated with that Account .

 

My code is not working thats why seeking help .

Error: core.apexpages.el.adapters.exceptions.UnknownPropertyException: Unknown property 'AccountStandardController.account'
Error
Error: Unknown property 'AccountStandardController.account'
 
I have a situation,i want  extended some of my standard controller property to my cusom controller ,when using my code i got following,here is my code anybody tell me ,where i did my mistake.
Code:
VF page:
<apex:page standardController="Account" extensions="myFirstController"  showHeader="true" tabStyle="Account">
<apex:pageBlock title="Accounts">
<apex:form >
<apex:dataTable value="{!accountList}"  var="account" cellpadding="4" border="1">
<apex:column >
<apex:commandLink >
<apex:outputText value="{!account.name}"/>
</apex:commandLink>
</apex:column>
</apex:dataTable>
</apex:form>
 </apex:pageBlock> 
 <apex:pageBlock title="Contacts">
 </apex:pageBlock>
  </apex:page>
Code:
public class myFirstController{ 
    public myFirstController(ApexPages.StandardController stdController){ }

 

 public Account[] getAccountList() {
  
           /*       return [select id,name from Account where id = :System.currentPageReference().getParameters().get('id') ];  */
           return [select id,name from Account limit 25]; 
                                 }    
            public String getName()
            
             { return 'My First Custom Controller';
             
             }
            
             }

 
  • June 25, 2008
  • Like
  • 0