• Ali Abdullatif
  • NEWBIE
  • 20 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
I have this class that only does this query 
public with sharing class Contracts_Statistics_Page_Controller {
	public List<AggregateResult > allFTContacts { get; set; }
    public Contracts_Statistics_Page_Controller (){
    	 
    	allFTContacts = [select count(id), Domestic_Helper__r.Current_Status111__c, Full_Time_Client__r.Status__c, Cancelled_contract__c 
    						from Contract_Full_Time__c where End_of_Contract__c>YESTERDAY 
    						group by Domestic_Helper__r.Current_Status111__c, Full_Time_Client__r.Status__c, Cancelled_contract__c]; 
    }
}

and I want to show it in this page
<apex:page controller="Contracts_Statistics_Page_Controller" showHeader="false">
<apex:define name="body">  
	<apex:form id="mainForm">       
		<apex:pageBlock id="myPageBlock" title="Contracts Statistics">                
	    	<apex:pageBlockTable id="myPageBlockTable" value="{!allFTContacts}" var="item" styleClass="maintable">
	            <apex:column headerValue="Domestic Helper status" value="{!item.Domestic_Helper__r.Current_Status111__c}" />
	            <apex:column headerValue="Full Time Client status" value="{!item.Full_Time_Client__r.Status__c}" />
	            <apex:column headerValue="Cancelled Contract" value="{!item.Cancelled_contract__c}" />
	            <apex:column headerValue="Count" value="{!item.count(id)}" />                    
	             
	        </apex:pageBlockTable>
		</apex:pageBlock>
	</apex:form>
</apex:define>
</apex:page>

but the file doesn't save as it tells me 
Save error: Invalid field Domestic_Helper__r for SObject AggregateResult    ContractsStatisticsPage.page   
 
I have a page that searches an object for names and shows a list that has been made according to this tutorial http://blog.jeffdouglas.com/2010/04/07/easily-search-and-edit-records-with-visualforce/
I've added a button column to the resulting list and I want that button to redirect me to another page where I can edit the selected result 
I've searched but I can only find redirection via adding the &id= to the url but the problem is that the second page uses a custom controller which appearently can't use the &id= refferal 
thank you very much
Hello friends

I have 3 feilds in my form and I need to update only one of them based on a selection
the problem is I want to be able to click a bottun and have the corresponding input field appear or disappear 
is there any way to do that?
I have a page that searches an object for names and shows a list that has been made according to this tutorial http://blog.jeffdouglas.com/2010/04/07/easily-search-and-edit-records-with-visualforce/
I've added a button column to the resulting list and I want that button to redirect me to another page where I can edit the selected result 
I've searched but I can only find redirection via adding the &id= to the url but the problem is that the second page uses a custom controller which appearently can't use the &id= refferal 
thank you very much
Hello friends

I have 3 feilds in my form and I need to update only one of them based on a selection
the problem is I want to be able to click a bottun and have the corresponding input field appear or disappear 
is there any way to do that?